mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't process pressed meta on linux
fix mac os keyboard layout on linux
This commit is contained in:
@@ -398,6 +398,8 @@ public class IdeEventQueue extends EventQueue {
|
||||
|
||||
if (skipTypedKeyEventsIfFocusReturnsToOwner(e)) return;
|
||||
|
||||
if (isMetaKeyPressedOnLinux(e)) return;
|
||||
|
||||
checkForTimeJump();
|
||||
|
||||
if (!appIsLoaded()) {
|
||||
@@ -466,6 +468,13 @@ public class IdeEventQueue extends EventQueue {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isMetaKeyPressedOnLinux(@NotNull AWTEvent e) {
|
||||
if (!Registry.is("keymap.skip.meta.press.on.linux")) return false;
|
||||
boolean metaIsPressed = e instanceof InputEvent && (((InputEvent)e).getModifiersEx() & InputEvent.META_DOWN_MASK) != 0;
|
||||
boolean typedKeyEvent = e.getID() == KeyEvent.KEY_TYPED;
|
||||
return SystemInfo.isLinux && typedKeyEvent && metaIsPressed;
|
||||
}
|
||||
|
||||
private boolean skipTypedKeyEventsIfFocusReturnsToOwner(@NotNull AWTEvent e) {
|
||||
if (e.getID() == WindowEvent.WINDOW_LOST_FOCUS) {
|
||||
WindowEvent wfe = (WindowEvent)e;
|
||||
|
||||
@@ -513,6 +513,8 @@ keymap.windows.as.meta.description='Windows' key press/release events would be p
|
||||
keymap.windows.up.to.maximize.dialogs=true
|
||||
keymap.windows.up.to.maximize.dialogs.description='Windows+Up' shortcut would maximize active dialog under Win 7+
|
||||
|
||||
keymap.skip.meta.press.on.linux=false
|
||||
|
||||
caches.indexerThreadsCount=-1
|
||||
indexer.follows.symlinks=true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user