blink
blink copied to clipboard
Windows 10 OpenSSH server arrow keys do not work
I have configured Windows 10 with an OpenSSH server, to run PowerShell as per the instructions here:
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration
I can connect fine, and run commands. However, pressing the up/down/left/right cursor movement keys on the iOS on-screen keyboard do nothing. Normally these keys cycle through the command history.
These keys work when I use Blink to ssh to a Linux OpenSSH server. It is just PowerShell via OpenSSH that does not work for me.
If I use other terminal clients, such as Shelly on iOS, it works fine, so Blink must be doing something different to cause it not to work.
Is this a configuration issue, or is it a problem in Blink?
I’m seeing similar behavior with SSH connections to some network switches. It appears that Blink is sending the key sequence ESC,O,A-D (application mode) for the arrows, while other programs send/expect ESC,[,A-D (normal mode). You can see this without even using an external system by comparing the output of “showkey” and “cat -v” in Blink. Probably application mode shouldn’t be used unless it’s requested (e.g. by a full-screen program like vi).
I’ve been dealing with the same issue on Windows 10. Going to bump this thread and see if it’s a known issue.
Same issue here with Windows 10 OpenSSH when using bash instead of PowerShell.
Same issue. Can’t use arrow keys when remoting to any Windows shell (whether PowerShell, PowerShell 7, or bash). However, arrow keys work fine - no surprise there - when connecting to WSL 2’s bash or PowerShell.
Any update on this? I am seeing the same issue. Is it best to SSH into WSL directly?
Can confirm, I’m also having the same issue. Is there any known workaround?
You can type command config
then go to Keyboard > Custom Presses to set arrow keys’ HEX sequence
Something similar happens to me connecting to a Windows Server using SSH.
If I connect from my local PC using a Powershell console all works fine but if I connect using an Ubuntu WSL console I get wrong mappings, ex [A
when doing arrow up.
What are the proper mappings for Arrows in Powershell? This sounds like we could just create a simple compatible layer for it.
Here are my keyboard "Custom Presses" that work well when connected to an OpenSSH server on a Windows Server 2019:
- Ctrl+Space - Hex code 00
- Up arrow key - Hex code 1b5b41
- Down arrow key - Hex code 1b5b42
- Right arrow key - Hex code 1b5b43
- Left arrow key - Hex code 1b5b44
I've been using them successfully in programs such as fish, bash, tmux, emacs.
Here are my keyboard "Custom Presses" that work well when connected to an OpenSSH server on a Windows Server 2019:
Thanks @HouzuoGuo! Would be nice to have these as a Windows specific preset in Blink.
Also having this issue when connecting to Windows 10 via SSH. The "Custom Presses" fix above does fix the problem.
Here are my keyboard "Custom Presses" that work well when connected to an OpenSSH server on a Windows Server 2019:
- Ctrl+Space - Hex code 00
- Up arrow key - Hex code 1b5b41
- Down arrow key - Hex code 1b5b42
- Right arrow key - Hex code 1b5b43
- Left arrow key - Hex code 1b5b44
I've been using them successfully in programs such as fish, bash, tmux, emacs.
Do you know why this is required in the first place?
Here are my keyboard "Custom Presses" that work well when connected to an OpenSSH server on a Windows Server 2019:
- Ctrl+Space - Hex code 00
- Up arrow key - Hex code 1b5b41
- Down arrow key - Hex code 1b5b42
- Right arrow key - Hex code 1b5b43
- Left arrow key - Hex code 1b5b44
I've been using them successfully in programs such as fish, bash, tmux, emacs.
Do you happen to know what the hex code is of the delete character? (opposed to backspace, i.e.: delete the character after the cursor).
Here are my keyboard "Custom Presses" that work well when connected to an OpenSSH server on a Windows Server 2019:
- Ctrl+Space - Hex code 00
- Up arrow key - Hex code 1b5b41
- Down arrow key - Hex code 1b5b42
- Right arrow key - Hex code 1b5b43
- Left arrow key - Hex code 1b5b44
I've been using them successfully in programs such as fish, bash, tmux, emacs.
hi. where do i put these?
These will come now as "by default" in 17.3.0.
But if you need to send them in the meantime, you can redefine them under config > keyboard > custom presses. See for example: https://github.com/blinksh/blink/discussions/1941
Fixed on 17.3.0 to be more consistent.