vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.23k stars 3.51k forks source link

Keyboard Commands with Ctrl #2880

Open iagobruno opened 6 years ago

iagobruno commented 6 years ago

Issue

Why do you block the keyboard commands (with "Ctrl") in the terminal? This is one of the most annoying things about native terminals ...

image

You could have at least one option in the settings to allow or not to use.

capi1O commented 6 years ago

I have the same PB with 2.0, therefore none of my keyboard shortcuts work.

Note : Keyboard shortcuts do work with Ctrl+Shift but I don't want this extra key press.

Stanzilla commented 6 years ago

All keybinds are configurable, see https://hyper.is/#keymaps

capi1O commented 6 years ago

Hum yes as I did (see the gist of my .hyper.js in my previous post).

Thing is does not work with ctrl+key keyboard shortcuts.

Stanzilla commented 6 years ago

I see, yeah CTRL keybinds seem to be the cause of a LOT of issues.

capi1O commented 6 years ago

still happening in 2.1.0- canary

capi1O commented 6 years ago

much better in 2.1.0-canary.2 ! but still few caveats.

based on same .hyper.js I porvided earlier :

  keymaps: {
    "tab:new":"Ctrl+T",
    "window:new":"Ctrl+Shift+N",
    "pane:close":"Ctrl+W",
    "editor:undo":"Ctrl+Z",
    "editor:redo":"Ctrl+Y",
    "editor:cut":"Ctrl+X",
    "editor:copy":"Ctrl+C",
    "editor:paste":"Ctrl+V",
    "editor:selectAll":"Ctrl+A"
}
capi1O commented 5 years ago

same problem in Hyper 2.1.2 (stable)

LordNouda commented 5 years ago

Same problem. Since tab switching is done with ctrl+shift+left/right I want to use ctrl+left/right to switch between panes (the default ctrl+pageup/pagedown is messing with scrolling in the terminal). Not working. My alternative ctrl+alt+left/right is also not working.


Hyper 2.1.2 (stable) on Ubuntu 18.04.1 LTS Plugins: hyper-one-dark (1.0.0), hyper-highlight-active-pane (0.1.0), hyper-search (0.1.1), hypercwd (1.4.0)

atwok commented 5 years ago

Issue

I'm having issue with ctrl-\, which I think is similar to this bug, but mine could be different. Basically, in emacs, I use ctrl-\ as undo. Hyper seems to be eating Ctrl-\ for some reason. I can't find it mapped to anything. If I just run bash.exe and load emacs, then Ctrl-\ works fine. Other Ctrl commands are working for me (C-x whatever). It just seems to be Ctrl-\ that disappears somewhere between my keyboard and emacs.

jflatow commented 5 years ago

Hyper looks awesome but this is a total blocker for me as I live inside emacs and its blocking ctrl combos

jflatow commented 5 years ago

For my undo key (C-_), xterm.js wasn't passing through the key at all. This patch fixes that one though I'm not sure if there's a more general/correct solution: https://github.com/xtermjs/xterm.js/pull/2052

raybotha commented 5 years ago

This is quite a blocker for me too, supporting both Ctrl+C copy and interrupt is keeping me on Terminator.

antonk52 commented 5 years ago

I have a related issue. I do not see ctrl+/ in the current darwin shortcuts yet I am unable to use it in my editor.

charlysotelo commented 5 years ago

This is a bit issue for me as well. I love Hyper, but this might cause me to switch.

capi1O commented 5 years ago

On windows ctrl+c actually works after the keymap setting for editor:break is changed (default is ctrl+c).

fqzhou commented 5 years ago

I have a related issue. I do not see ctrl+/ in the current darwin shortcuts yet I am unable to use it in my editor.

I meet the same same issue. I use hyper in win10 with window subsystem for linux (ubuntu18). I find in the emacs25 the key combination 'ctrl+/' does not function, while in other terminals like 'cmder' the key combination functions well.

jdheyburn commented 5 years ago

For the record - I get this on Linux too.

$ cat /etc/os-release                                            
NAME="Pop!_OS"
VERSION="19.04"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Pop!_OS 19.04"
VERSION_ID="19.04"
$ hyper version  
3.0.2
wethinkagile commented 5 years ago

@didrip suggestion does not work for me, even though it recognizes the changes. I then tried the altIsMeta property in the config file and got an JS formatting issue error message. Can somebody explain how the modifierKeys / altIsMeta JSON property is supposed to look like syntactically?

charlysotelo commented 5 years ago

Why was this closed?

hqsiswiliam commented 4 years ago

much better in 2.1.0-canary.2 ! but still few caveats.

based on same .hyper.js I porvided earlier :

  keymaps: {
  "tab:new":"Ctrl+T",
  "window:new":"Ctrl+Shift+N",
  "pane:close":"Ctrl+W",
  "editor:undo":"Ctrl+Z",
  "editor:redo":"Ctrl+Y",
  "editor:cut":"Ctrl+X",
  "editor:copy":"Ctrl+C",
  "editor:paste":"Ctrl+V",
  "editor:selectAll":"Ctrl+A"
}
  • ctrl+V/A/W/T works
  • ctrl+C does not copy selected text
  • ctrl+X does copy selected text (to clipboard) but does not remove it
  • ctrl+Z/Y do not undo/redo

I tried your method, and I noticed that you need to convert "Ctrl+A" to "ctrl+a" so it would work. Also, ctrl+c will conflict with break command so I move break to ctrl+d. Here is my keymap:

  keymaps: {
    "tab:new":"ctrl+t",
    "window:new":"ctrl+shift+n",
    "pane:close":"ctrl+w",
    "editor:undo":"ctrl+z",
    "editor:redo":"ctrl+y",
    "editor:copy":"ctrl+c",
    "editor:paste":"ctrl+v",
    "editor:selectAll":"ctrl+a",
    "editor:break":"ctrl+d",
  },
miltongq commented 4 years ago

At some point this was just a syntax issue, this issue should be closed by now.

ssthomas commented 4 years ago

For my undo key (C-_), xterm.js wasn't passing through the key at all. This patch fixes that one though I'm not sure if there's a more general/correct solution: xtermjs/xterm.js#2052

Does this mean that xterm.js will require code for every possible Ctrl+ combination? Seems like this may be a possible resolution for https://github.com/zeit/hyper/issues/4251 as well.

ronilaukkarinen commented 3 years ago

I'm looking for ctrl+a = go to the beginning of the line and ctrl+e = go to the end of the line. How do I do this with hyper?

ronilaukkarinen commented 3 years ago

I'm looking for ctrl+a = go to the beginning of the line and ctrl+e = go to the end of the line. How do I do this with hyper?

Never mind, figured it out:

keymaps: {
  // Example
  // 'window:devtools': 'cmd+alt+o',
  'window:home': 'ctrl+alt+a',
  'window:end': 'ctrl+alt+e',
},
hexcowboy commented 3 years ago

It looks like <C-^> (Ctrl + ^) is blocked. This is the key stroke for going to the previous file in vim.

huix9527 commented 4 months ago

same issue, ctrl+/ blocked, losing faith