diff --git a/app/src/main/java/com/termux/app/TermuxKeyListener.java b/app/src/main/java/com/termux/app/TermuxKeyListener.java index b98abe53..46695a29 100644 --- a/app/src/main/java/com/termux/app/TermuxKeyListener.java +++ b/app/src/main/java/com/termux/app/TermuxKeyListener.java @@ -250,9 +250,10 @@ public final class TermuxKeyListener implements TerminalKeyListener { List shortcuts = mActivity.mSettings.shortcuts; if (!shortcuts.isEmpty()) { + int codePointLowerCase = Character.toLowerCase(codePoint); for (int i = shortcuts.size() - 1; i >= 0; i--) { TermuxPreferences.KeyboardShortcut shortcut = shortcuts.get(i); - if (codePoint == shortcut.codePoint) { + if (codePointLowerCase == shortcut.codePoint) { switch (shortcut.shortcutAction) { case TermuxPreferences.SHORTCUT_ACTION_CREATE_SESSION: mActivity.addNewSession(false, null); diff --git a/app/src/main/java/com/termux/app/TermuxPreferences.java b/app/src/main/java/com/termux/app/TermuxPreferences.java index 58be51a4..e856379b 100644 --- a/app/src/main/java/com/termux/app/TermuxPreferences.java +++ b/app/src/main/java/com/termux/app/TermuxPreferences.java @@ -184,9 +184,9 @@ final class TermuxPreferences { private void parseAction(String name, int shortcutAction, Properties props) { String value = props.getProperty(name); if (value == null) return; - String[] parts = value.trim().split("\\+"); + String[] parts = value.toLowerCase().trim().split("\\+"); String input = parts.length == 2 ? parts[1].trim() : null; - if (!(parts.length == 2 && parts[0].trim().equalsIgnoreCase("ctrl")) || input.isEmpty() || input.length() > 2) { + if (!(parts.length == 2 && parts[0].trim().equals("ctrl")) || input.isEmpty() || input.length() > 2) { Log.e("termux", "Keyboard shortcut '" + name + "' is not Ctrl+"); return; }