{"action":"created","issue":{"url":"https://api.github.com/repos/zeit/hyper/issues/1191","repository_url":"https://api.github.com/repos/zeit/hyper","labels_url":"https://api.github.com/repos/zeit/hyper/issues/1191/labels{/name}","comments_url":"https://api.github.com/repos/zeit/hyper/issues/1191/comments","events_url":"https://api.github.com/repos/zeit/hyper/issues/1191/events","html_url":"https://github.com/zeit/hyper/pull/1191","id":195418478,"number":1191,"title":"Keyboard shortcut prefix fix for Windows, Linux (Ctrl+Shift). Fixes #1069.","user":{"login":"nbolten","id":1947393,"avatar_url":"https://avatars.githubusercontent.com/u/1947393?v=3","gravatar_id":"","url":"https://api.github.com/users/nbolten","html_url":"https://github.com/nbolten","followers_url":"https://api.github.com/users/nbolten/followers","following_url":"https://api.github.com/users/nbolten/following{/other_user}","gists_url":"https://api.github.com/users/nbolten/gists{/gist_id}","starred_url":"https://api.github.com/users/nbolten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbolten/subscriptions","organizations_url":"https://api.github.com/users/nbolten/orgs","repos_url":"https://api.github.com/users/nbolten/repos","events_url":"https://api.github.com/users/nbolten/events{/privacy}","received_events_url":"https://api.github.com/users/nbolten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-14T01:41:33Z","updated_at":"2016-12-21T18:23:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zeit/hyper/pulls/1191","html_url":"https://github.com/zeit/hyper/pull/1191","diff_url":"https://github.com/zeit/hyper/pull/1191.diff","patch_url":"https://github.com/zeit/hyper/pull/1191.patch"},"body":"This pull request fixes #1069 (and related issues like #1100).\r\n\r\n### Overview\r\n\r\nInteractive command line applications commonly bind to <kbd>Ctrl</kbd>+<kbd>&lt;key&gt;</kbd> keyboard shortcuts. For example, `nano` uses <kbd>Ctrl</kbd>+(<kbd>G</kbd>, <kbd>O</kbd>, <kbd>W</kbd>, <kbd>K</kbd>, <kbd>J</kbd>, <kbd>C</kbd>, <kbd>X</kbd>, <kbd>R</kbd>, <kbd>\\\\</kbd>, <kbd>U</kbd>, <kbd>T</kbd>, <kbd>_</kbd>, <kbd>V</kbd>) for essential functionality like reading and writing files and exiting the program. Other applications are similar, like `tmux` and `screen`, relying on keyboard shortcuts to manage the program's basic functionality.\r\n\r\nThis isn't an issue when using `hyper` on Macs, as the modifier prefix for interacting with the `hyper` windows is <kbd>Cmd</kbd>. On non-Macs (like Windows and Linux machines), the default prefix is `Ctrl`, which causes many conflicts.\r\n\r\nThis pull request proposes to address these conflicts by setting the default prefix on non-Macs to <kbd>Ctrl</kbd>+<kbd>Shift</kbd>, which is common for terminal emulators in linux. The <kbd>Super</kbd> 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 <kbd>Ctrl</kbd>+<kbd>Shift</kbd>, some shortcuts were changed to (hopefully) reasonable alternatives. This pull request does not change any shortcuts on Macs.\r\n\r\n### Summary of changes\r\n\r\n1. Default shortcut prefix on non-Macs changed from <kbd>Ctrl</kbd> to <kbd>Ctrl</kbd>+<kbd>Shift</kbd>.\r\n\r\n2. Some shortcuts that already used <kbd>Ctrl</kbd>+<kbd>Shift</kbd> were changed to be more similar to their Mac counterparts:\r\n    - split vertically was changed from <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>E</kbd> to <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd>\r\n\r\n3. Some shortcuts already used <kbd>Ctrl</kbd>+<kbd>Shift</kbd> and are unchanged\r\n    - copy is <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>C</kbd>\r\n    - devtools is <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd>\r\n    - update plugins is <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>U</kbd>\r\n    - `moveLeft2` and `moveRight2` are <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>{</kbd> and <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>}</kbd>\r\n\r\n4. Some shortcuts were changed to (hopefully) reasonable alternatives\r\n   - split horizontally was changed from <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>O</kbd> to <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>E</kbd>\r\n    - redo was changed from <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd> (now undo) to <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Y</kbd>\r\n    - closing the entire window was changed from <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>W</kbd> (now close tab) to <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Q</kbd>\r\n    - full reload was changed from <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd> (now reload) to <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>F5</kbd>\r\n\r\n5. I didn't know what to do with some of the shortcuts, so in those cases I replaced <kbd>Shift</kbd> with Z (please review/change!)\r\n    - previous pane was changed from <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Alt</kbd>+<kbd>Tab</kbd> to <kbd>Ctrl</kbd>+<kbd>Z</kbd>+<kbd>Alt</kbd>+<kbd>Tab</kbd>.\r\n    - `moveLeft1` was changed from <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Left</kbd> to <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd>+<kbd>Left</kbd>\r\n    - `moveRight1` was changed from <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Right</kbd> to <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd>+<kbd>Right</kbd>\r\n    - `moveLeft4` was changed from <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd> to <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd>+<kbd>Tab</kbd>\r\n\r\nOne 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!\r\n\r\nI was unable to test whether the `undo` functionality was broken by using <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd>+<kbd>&lt;key&gt;</kbd>. I'm not actually sure what `undo` is supposed to do in `hyper` (or the moveLeft1/2/3/4 options). Are they bound to any actions?\r\n\r\nIt 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.\r\n\r\n### From hyper's pull request template\r\n\r\n- *To help whoever reviews your PR, it'd be extremely helpful for you to list whether your PR is ready to be merged*: \r\n  - This PR is ready to be merged\r\n- *If there's anything left to do and if there are any related PRs*\r\n  - Someone should review the new defaults to make sure they don't break conventions. I'm also unsure what to do with the 4 cases where I used <kbd>Z</kbd> instead of <kbd>Shift</kbd>, though it didn't seem to break anything for me.\r\n  - Pull requests related to shortcuts would need to be updated, particularly #925 \r\n- *It'd also be extremely helpful to enable us to update your PR incase we need to rebase or what-not by checking `Allow edits from maintainers`*\r\n  - Done!"},"comment":{"url":"https://api.github.com/repos/zeit/hyper/issues/comments/268600717","html_url":"https://github.com/zeit/hyper/pull/1191#issuecomment-268600717","issue_url":"https://api.github.com/repos/zeit/hyper/issues/1191","id":268600717,"user":{"login":"hahuang65","id":280972,"avatar_url":"https://avatars.githubusercontent.com/u/280972?v=3","gravatar_id":"","url":"https://api.github.com/users/hahuang65","html_url":"https://github.com/hahuang65","followers_url":"https://api.github.com/users/hahuang65/followers","following_url":"https://api.github.com/users/hahuang65/following{/other_user}","gists_url":"https://api.github.com/users/hahuang65/gists{/gist_id}","starred_url":"https://api.github.com/users/hahuang65/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hahuang65/subscriptions","organizations_url":"https://api.github.com/users/hahuang65/orgs","repos_url":"https://api.github.com/users/hahuang65/repos","events_url":"https://api.github.com/users/hahuang65/events{/privacy}","received_events_url":"https://api.github.com/users/hahuang65/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T18:23:43Z","updated_at":"2016-12-21T18:23:43Z","body":"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."}}
{"actor":{"display_login":"hahuang65"}}