Key bindings can be updated with any key.
- Changed key press from FXML key event to a listener - UP, DOWN, ENTER keys now work - Keys no longer change cells or press buttons - Added placeholder buttons Cancel, Reset and Save - Added some JavaDoc #story[1197]
This commit is contained in:
@@ -52,8 +52,14 @@ public class KeyFactory {
|
||||
return keyState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the key bound to a particular command in the keystate.
|
||||
* @param oldKey the existing key to updated
|
||||
* @param newKey the new key value to replace the old
|
||||
*/
|
||||
public void updateKey(String oldKey, String newKey){
|
||||
ControlKey controlKey = keyState.get(oldKey);
|
||||
keyState.remove(oldKey, controlKey);
|
||||
keyState.put(newKey, controlKey);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user