Keyboard shortcut prefix fix for Windows, Linux (Ctrl+Shift). Fixes #1069.#1191
Keyboard shortcut prefix fix for Windows, Linux (Ctrl+Shift). Fixes #1069.#1191nbolten wants to merge 4 commits intovercel:masterfrom nbolten:master
Conversation
…inux, windows, etc) to prevent conflict with common terminal application shortcuts (e.g. ctrl+x in nano).
|
I tested the diff on Hyper 1.0.0 Windows. The new shortcuts don't seem to work, Ctrl+Shift+T or Ctrl+Shift+A for example. Ctrl+A still selects the text and doesn't send the command. It's on the good track though 😃 |
|
Hi @yellowiscool! I did a build on Windows 10 (npm run dev + npm run pack + running the dist Hyper.exe) and Ctrl+Shift+T and Ctrl+Shift+W worked fine. Is Ctrl+A supposed to select all the text in the current cursor? Neither that nor Ctrl+Shift+A work for me, nor does Menu>Edit>Select All. This is running off of a downloaded zip copy of my fork. |
|
Ah, @yellowiscool, the |
|
I'd love for this to make it into a build sooner rather than later! I really want to use Hyper on Linux, but I need ctrl-a and ctrl-v to not be swallowed by the app and passed on to the shell. |
|
Same here, I use ctrl+a in tmux and ctrl+w and ctrl+x in nano, this is currently a blocker for me using hyper until this is merged. |
|
same here, this is bug not a feature, the fix has to be released asap. For me its also a show stopper |
|
Any chance we can get a review on this? Would really love to use this... |
|
An update on the current state of this issue ? |
|
Awwww....I assumed this had been merged when 1.1 came out.....back to running @nbolten fork again. |
|
I am also waiting on this one, would love to start using on my Linux desktop |
|
I'm 👍 on this idea, Ctrl-[LETTER] has too much going on to try to assign all of the shortcuts to it |
anaisbetts
left a comment
There was a problem hiding this comment.
I'm generally into this change, just a few suggestions
| minimize: 'M', | ||
| showPreviousTab: 'Alt+Left', | ||
| showNextTab: 'Alt+Right', | ||
| showPreviousTab: isMac ? 'Alt+Left' : '+Ctrl+PageDown', |
There was a problem hiding this comment.
Can this just be Ctrl-Shift-Tab?
There was a problem hiding this comment.
No strong opinions from me on this, but Ctrl+PageDown/Up is used by VS Code, Gnome Terminal, and Atom.
There was a problem hiding this comment.
Actually, Ctrl+Tab and Ctrl+Shift+Tab is also used by Atom/Chrome, so maybe both could be used?
| showPreviousTab: 'Alt+Left', | ||
| showNextTab: 'Alt+Right', | ||
| showPreviousTab: isMac ? 'Alt+Left' : '+Ctrl+PageDown', | ||
| showNextTab: isMac ? 'Alt+Right' : '+Ctrl+PageUp', |
| showNextTab: 'Alt+Right', | ||
| showPreviousTab: isMac ? 'Alt+Left' : '+Ctrl+PageDown', | ||
| showNextTab: isMac ? 'Alt+Right' : '+Ctrl+PageUp', | ||
| selectNextPane: 'Ctrl+Alt+Tab', |
There was a problem hiding this comment.
This shortcut doesn't work on Windows, it will invoke Alt-Tab
There was a problem hiding this comment.
Ctrl+Alt+Tab/Ctrl+Shift+Alt+Tab also conflicts with the Accessibility Switcher on Gnome, that's no good...
iTerm uses Cmd+]/[.
tmux, screen, and Atom use special pane modes for pane manipulation, so e.g 'next pane' in Atom is Ctrl+k to enter pane mode, then Ctrl+n for 'next pane'.
I don't use panes and also don't have strong opinions on this one.
There was a problem hiding this comment.
Maybe Ctrl-Shift-LeftArrow + Ctrl-Shift-RightArrow?
There was a problem hiding this comment.
just throwing out some ideas.. in atom, the panes are indexed, and we can switch between them using ctrl+[index].. would it be possible to have something similar?
There was a problem hiding this comment.
@ignatiusreza hyper-pane plugin has been made for this purpose: https://www.npmjs.com/package/hyper-pane
There was a problem hiding this comment.
wow! looking good! thanks @chabou 👍
|
Would it be possible to change the 'update plugins' shortcut? Ctrl+Shift+U is for inserting unicode characters in Ubuntu. Perhaps Ctrl+Shift+P? |
|
Some are missing. But can you update those key map with the desired keys in comments. |
|
why is this not in the actual release? |
|
👍 |
|
@ppot any chance to get this in any time soon? |
|
@Stanzilla You mean my version? See #1509 Still need to make flexible Keymap before merging |
|
Oh, I see |
|
three weaks gone, 2 new release and this isn't merged... again so much time lost where i cant use hyper, and i want to use hyper! |
|
@celevra Look at Keymap PR |
|
Would love to see this merged. |
|
I just started to use Hyper a few hours ago on my Arch box and love it so much I put it on my F25 daily workstation as well, BUT the keybindings are making it... well not useless, but difficult to live with. EDIT: Me honestly could live with a super as cmd key, is there any way to change it? I think can do that in accelerators.js, but not sure if takes effect? |
|
any plan on making the shortcuts configurable? |
|
@ignatiusreza Yes, #1509 |
|
How can I fix the key-bindings to match with the Gnome Terminal? Is there somewhere I need to paste the {} json block quoted above? |
|
@alexellis PR listed above Keymaps |
|
@ppot my question is how to apply / set those keycaps. It's not clear to me from the documentation / PR. Please could you explain? |
|
@alexellis Take a look at my PR Keymaps #1509 |
|
Since a cooler keymaps implementation is on the way, I'm closing this PR. Hope #1509 gets reviewed/merged soon! |
This pull request fixes #1069 (and related issues like #1100).
Overview
Interactive command line applications commonly bind to Ctrl+<key> keyboard shortcuts. For example,
nanouses Ctrl+(G, O, W, K, J, C, X, R, \, U, T, _, V) for essential functionality like reading and writing files and exiting the program. Other applications are similar, liketmuxandscreen, relying on keyboard shortcuts to manage the program's basic functionality.This isn't an issue when using
hyperon Macs, as the modifier prefix for interacting with thehyperwindows is Cmd. On non-Macs (like Windows and Linux machines), the default prefix isCtrl, which causes many conflicts.This pull request proposes to address these conflicts by setting the default prefix on non-Macs to Ctrl+Shift, which is common for terminal emulators in linux. The Super key has been suggested as an alternative, but this would conflict with several shortcuts built into the Windows OS as well as many linux-focused desktop environment like Unity and Gnome. To avoid conflicts with defaults that already used Ctrl+Shift, some shortcuts were changed to (hopefully) reasonable alternatives. This pull request does not change any shortcuts on Macs.
Summary of changes
Default shortcut prefix on non-Macs changed from Ctrl to Ctrl+Shift.
Some shortcuts that already used Ctrl+Shift were changed to be more similar to their Mac counterparts:
Some shortcuts already used Ctrl+Shift and are unchanged
moveLeft2andmoveRight2are Ctrl+Shift+{ and Ctrl+Shift+}Some shortcuts were changed to (hopefully) reasonable alternatives
I didn't know what to do with some of the shortcuts, so in those cases I replaced Shift with Z (please review/change!)
moveLeft1was changed from Ctrl+Shift+Left to Ctrl+Shift+Z+LeftmoveRight1was changed from Ctrl+Shift+Right to Ctrl+Shift+Z+RightmoveLeft4was changed from Ctrl+Shift+Tab to Ctrl+Shift+Z+TabOne of the shortcuts in that last case already involved five simultaneous keypresses, even on a Mac, so I'll humbly suggest it be switched to something else entirely!
I was unable to test whether the
undofunctionality was broken by using Ctrl+Shift+Z+<key>. I'm not actually sure whatundois supposed to do inhyper(or the moveLeft1/2/3/4 options). Are they bound to any actions?It may also be worthwhile to review Atom's shortcuts for linux + windows for better defaults. Windows version here https://github.com/atom/atom/blob/master/keymaps/win32.cson and linux version here https://github.com/atom/atom/blob/master/keymaps/linux.cson.
From hyper's pull request template
Allow edits from maintainers