Last active
July 18, 2022 14:24
-
-
Save parisk/f2d7eb8bd5584d9969c2449eee9d052c to your computer and use it in GitHub Desktop.
xterm.js keyMap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example keymap for usage in xterm.js | |
* Original issue: https://github.com/sourcelair/xterm.js/issues/487 | |
*/ | |
// We export this as default, since the only thing we care about | |
// is the contents of the keymap. No classes, methods or anything | |
// else is expected. | |
export default let keyMap = | |
{ | |
"mac": { | |
"F1": "\033OP", | |
"F2": "\033OQ", | |
"F3": "\033OR", | |
"F4": "\033OS", | |
"F5": "\033[15~", | |
"F6": "\033[17~", | |
"F7": "\033[18~", | |
"F8": "\033[19~", | |
"F9": "\033[20~", | |
"F10": "\033[21~", | |
"F11": "\033[23~", | |
"F12": "\033[24~", | |
"Shift+F5": "\033[25~", | |
"Shift+F6": "\033[26~", | |
"Shift+F7": "\033[28~", | |
"Shift+F8": "\033[29~", | |
"Shift+F9": "\033[31~", | |
"Shift+F10": "\033[32~", | |
"Shift+F11": "\033[33~", | |
"Shift+F12": "\033[34~", | |
"Alt+F1": "\033[17~", | |
"Alt+F2": "\033[18~", | |
"Alt+F3": "\033[19~", | |
"Alt+F4": "\033[20~", | |
"Alt+F5": "\033[21~", | |
"Alt+F6": "\033[23~", | |
"Alt+F7": "\033[24~", | |
"Alt+F8": "\033[25~", | |
"Alt+F9": "\033[26~", | |
"Alt+F10": "\033[28~", | |
"Alt+F11": "\033[29~", | |
"Alt+F12": "\033[31~", | |
"Shift+Left": "\033[1;2D", | |
"Alt+Left": "\033b", // Jump one word left | |
"Ctrl+Left": "\033[1;5D", | |
"Shift+Right": "\033[1;2C", | |
"Alt+Right": "\033f", // Jump one word right | |
"Ctrl+Right": "\033[1;5C", | |
"Delete": "\033[3~", // Delete the first right character | |
"Shift+Delete": "\033[3;2~", | |
"Ctrl+Delete": "\033[3;5~", | |
"Ctrl+Alt+Delete": "\033\033[3;5~", | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment