Open uncher opened 2 months ago
"change language" I mean keyboard layout
For mysefl I found next solution. In file termux-app-master\terminal-view\src\main\java\com\termux\view\TerminalView.java i add another else-if condition with KeyEvent.KEYCODE_LANGUAGE_SWITCH, change
if (mClient.onKeyDown(keyCode, event, mTermSession)) {
invalidate();
return true;
} else if (event.isSystem() && (!mClient.shouldBackButtonBeMappedToEscape() || keyCode != KeyEvent.KEYCODE_BACK)) {
return super.onKeyDown(keyCode, event);
} else if (event.getAction() == KeyEvent.ACTION_MULTIPLE && keyCode == KeyEvent.KEYCODE_UNKNOWN) {
mTermSession.write(event.getCharacters());
return true;
}
to
if (mClient.onKeyDown(keyCode, event, mTermSession)) {
invalidate();
return true;
} else if (event.isSystem() && (!mClient.shouldBackButtonBeMappedToEscape() || keyCode != KeyEvent.KEYCODE_BACK)) {
return super.onKeyDown(keyCode, event);
} else if (event.getAction() == KeyEvent.ACTION_MULTIPLE && keyCode == KeyEvent.KEYCODE_UNKNOWN) {
mTermSession.write(event.getCharacters());
return true;
} else if (keyCode == KeyEvent.KEYCODE_LANGUAGE_SWITCH) {
return super.onKeyDown(keyCode, event);
}
Work perfect for me. For building application i use last Android Studio Ladybug | 2024.2.1, Gradle JDK - Amazon Corretto 17.0.12
Problem description
Samsung Tab S9 FE with original external keyboard Book Cover Keyboard. This keyboard has separate key "Lang" for changing language. Termux version 0.118.1. Then i working in Termux - i cant change language with key Lang, Ctrl+Space hotkey also not working.
Steps to reproduce the behavior.
Samsung Tab S9 FE with Book Cover Keyboard, installed Termux app.
What is the expected behavior?
No response
System information