Button: fixed behavior of Enter key on focused button on Windows and Linux, which now clicks the focused button (instead of the default button)

This commit is contained in:
Karl Tauber
2021-01-30 00:37:20 +01:00
parent dc570c683a
commit 036090a947
4 changed files with 19 additions and 5 deletions

View File

@@ -42,10 +42,12 @@ class FlatInputMaps
}
private static void initBasicInputMaps( UIDefaults defaults ) {
defaults.put( "Button.focusInputMap", new UIDefaults.LazyInputMap( new Object[] {
"SPACE", "pressed",
"released SPACE", "released"
} ) );
if( SystemInfo.isMacOS ) {
defaults.put( "Button.focusInputMap", new UIDefaults.LazyInputMap( new Object[] {
"SPACE", "pressed",
"released SPACE", "released"
} ) );
}
modifyInputMap( defaults, "ComboBox.ancestorInputMap",
"SPACE", "spacePopup",