Hacker News new | past | comments | ask | show | jobs | submit login
Terminal Function Key Escape Codes (2005) (aperiodic.net)
3 points by Bayart on Oct 20, 2021 | hide | past | favorite | 1 comment



I recently walked into a pretty esoteric issue for people who don't with terminal emulation often :

Having rebound at firmware level my Left Ctrl key to F13, I found that while the key was appropriately grabbed at the OS and terminal emulation level, it wasn't really making it to my weird Zsh setup (The culprit is Zsh Vi Mode[1]. It's great !) and it couldn't be bound through bindkey. And I couldn't really change the keyboard binding to anything else because everything's already configured to use F13.

I ended up looking everywhere for what scancode I should be reading on the command line, and found this endlessly useful little cheatsheet.

In the end I configured the terminal emulator to output \u001b[25~ on F13 inputs and now it kinda mostly works.

[1]: https://github.com/jeffreytse/zsh-vi-mode




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: