Fixing Keyboard Issues with Rebex and Non-US Keyboards
l
little. note
started a topic 3 days ago
If you're not using a US keyboard, you might have encountered the frustrating issue where your keyboard isn’t passed through correctly in Rebex. For example, the Home and End keys might not work as intended (e.g., typing ~ instead of their intended function).
In my case, I use a Canadian Multilingual keyboard on Windows 10, and everything worked fine with other terminal applications, until I started using Rebex.
Here’s how I fixed it using two different methods in the .zshrc file. If you’re using bashrc, you’ll need to find the equivalent configuration.
Method 1: Set the Language Environment Variable
1. Open the .zshrc file on your server (usually found in your home directory).
2. Add or uncomment the following line:
export LANG=en_US.UTF-8
Text
3. Save the file and reload the terminal.
This method resolves the issue in most cases and is elegant and lightweight. However, if it doesn’t work, proceed to the second method.
Method 2: Bind Faulty Keys Manually
1. Open a terminal on your remote server and type:
cat
Text
2. Press the keys that are not working as expected (Home, End, etc.). This will output key codes, such as:
^[[1~ ^[[4~
Text
3. Take note of these codes and edit your .zshrc file.
Add the following lines, replacing the key codes with the ones you noted:
bindkey '^[[1~' beginning-of-line # For Home key
bindkey '^[[4~' end-of-line # For End key
Text
Save the file and reload the terminal.
Additional Resources
If you need to rebind other keys, check the complete list of key names you can use in .zshrc
little. note
If you're not using a US keyboard, you might have encountered the frustrating issue where your keyboard isn’t passed through correctly in Rebex. For example, the Home and End keys might not work as intended (e.g., typing
~
instead of their intended function).In my case, I use a Canadian Multilingual keyboard on Windows 10, and everything worked fine with other terminal applications, until I started using Rebex.
Here’s how I fixed it using two different methods in the
.zshrc
file. If you’re using bashrc, you’ll need to find the equivalent configuration.Method 1: Set the Language Environment Variable
1. Open the
.zshrc
file on your server (usually found in your home directory).2. Add or uncomment the following line:
3. Save the file and reload the terminal.
This method resolves the issue in most cases and is elegant and lightweight. However, if it doesn’t work, proceed to the second method.
Method 2: Bind Faulty Keys Manually
2. Press the keys that are not working as expected (Home, End, etc.). This will output key codes, such as:
3. Take note of these codes and edit your
.zshrc
file.Add the following lines, replacing the key codes with the ones you noted:
Save the file and reload the terminal.
Additional Resources
If you need to rebind other keys, check the complete list of key names you can use in
.zshrc