@Override
public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation) {
boolean consumed = super.keyPressed(component, keyCode, keyLocation);
Slider slider = (Slider)TerraSliderSkin.this.getComponent();
int start = slider.getStart();
int end = slider.getEnd();
int length = end - start;
int value = slider.getValue();
int increment = length / 10;
if (keyCode == Keyboard.KeyCode.LEFT) {
slider.setValue(Math.max(start, value - increment));
consumed = true;
} else if (keyCode == Keyboard.KeyCode.RIGHT) {
slider.setValue(Math.min(end, value + increment));
consumed = true;
}
return consumed;
}