hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Map Keys to Control Sequences

Open marksluser opened this issue 8 years ago • 2 comments

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: MacOS High Sierra 10.13.4
  • Hyper.app version: 2.0.0 (stable)
  • Link of a Gist with the contents of your .hyper.js: https://gist.github.com/msluser/50b3d66b400d91cbd81cd1e909acb57e.js
  • Relevant information from devtools N/A
  • The issue is reproducible in vanilla Hyper.app: Is Vanilla

Issue

How do we map or bind keys to control or escape sequences in Hyper? The config file ".hyper.js", has the keymaps section:

keymaps :{
    "editor:copy": "cmd+c",
    "editor:paste": "cmd+v"
}

But what if I want to map CMD+ALT+UP to a control or escape sequence? I tried this but it didn't work:

keymaps :{
    "\x1b[1;11A": "cmd+alt+up",
    "\x1b[1;11B": "cmd+alt+down",
    "\x1b[1;11C": "cmd+alt+right",
    "\x1b[1;11D": "cmd+alt+left"
}

Thank you in advance.

marksluser avatar May 01 '18 19:05 marksluser

+1, I typically map command combinations to tmux commands. How can we send hex codes? For example:

 '0x02 0x6E': 'cmd+right',

gcaglar avatar May 14 '18 04:05 gcaglar

I know this is a stale issue, but I have this issue as well. Customizing the keymapping in Hyper to control/escape sequences would be amazing (I work in pulling data from old terminal apps and they key mapping doesn't always make sense).

ghost avatar Jul 27 '20 19:07 ghost