-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard shortcut prefix fix for Windows, Linux (Ctrl+Shift). Fixes #1069. #1191
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm generally into this change, just a few suggestions
|
||
// Window menu | ||
minimize: 'M', | ||
showPreviousTab: 'Alt+Left', | ||
showNextTab: 'Alt+Right', | ||
showPreviousTab: isMac ? 'Alt+Left' : '+Ctrl+PageDown', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this just be Ctrl-Shift-Tab?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, Ctrl+Tab and Ctrl+Shift+Tab is also used by Atom/Chrome, so maybe both could be used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
showPreviousTab: 'Alt+Left', | ||
showNextTab: 'Alt+Right', | ||
showPreviousTab: isMac ? 'Alt+Left' : '+Ctrl+PageDown', | ||
showNextTab: isMac ? 'Alt+Right' : '+Ctrl+PageUp', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ctrl-Tab?
showPreviousTab: 'Alt+Left', | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shortcut doesn't work on Windows, it will invoke Alt-Tab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Ctrl-Shift-LeftArrow + Ctrl-Shift-RightArrow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ignatiusreza hyper-pane plugin has been made for this purpose: https://www.npmjs.com/package/hyper-pane
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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,
nano
uses 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, liketmux
andscreen
, relying on keyboard shortcuts to manage the program's basic functionality.This isn't an issue when using
hyper
on Macs, as the modifier prefix for interacting with thehyper
windows 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
moveLeft2
andmoveRight2
are 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!)
moveLeft1
was changed from Ctrl+Shift+Left to Ctrl+Shift+Z+LeftmoveRight1
was changed from Ctrl+Shift+Right to Ctrl+Shift+Z+RightmoveLeft4
was 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
undo
functionality was broken by using Ctrl+Shift+Z+<key>. I'm not actually sure whatundo
is 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