Skip to content

Commit 0690be4

Browse files
author
Workbench
committed
fixes: termux#3896 - Ctrl+Space sends Ctrl-@ (NUL) unconditionally
1 parent 6f1bc3d commit 0690be4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

terminal-view/src/main/java/com/termux/view/TerminalView.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,10 +660,9 @@ public boolean onKeyPreIme(int keyCode, KeyEvent event) {
660660
return onKeyUp(keyCode, event);
661661
}
662662
}
663-
} else if (mClient.shouldUseCtrlSpaceWorkaround() &&
664-
keyCode == KeyEvent.KEYCODE_SPACE && event.isCtrlPressed()) {
665-
/* ctrl+space does not work on some ROMs without this workaround.
666-
However, this breaks it on devices where it works out of the box. */
663+
} else if (keyCode == KeyEvent.KEYCODE_SPACE && event.isCtrlPressed()) {
664+
// Ctrl+Space should send Ctrl-@ (NUL) in the terminal. (#3896)
665+
// Intercept before the IME so it reaches the terminal.
667666
return onKeyDown(keyCode, event);
668667
}
669668
return super.onKeyPreIme(keyCode, event);

0 commit comments

Comments
 (0)