-
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
Keymaps #1509
Keymaps #1509
Conversation
@iamstarkov if you prefer to look at a simpler keymap for now |
.gitignore
Outdated
@@ -6,6 +6,7 @@ node_modules | |||
|
|||
# logs | |||
npm-debug.log | |||
.DS_Store |
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 doesn't belong in .gitignore
as it's not a build artifact
app/index.js
Outdated
@@ -47,9 +47,12 @@ const fileUriToPath = require('file-uri-to-path'); | |||
const isDev = require('electron-is-dev'); | |||
|
|||
// Ours | |||
const Keymap = resolve(__dirname, '../keymaps/darwin.json'); | |||
console.log(Keymap); |
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.
Remove this please
The only thing that's not clear to me is:
|
The current implementation lay ground for implementing an edit commands depending on the keybinding. Allowing the keymap to be change is a different issue and 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.
looks good to me
app/menus/menus/window.js
Outdated
accelerator: commands['window:minimize'] | ||
}, | ||
{ | ||
role: 'zoom' |
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 is confusing. Shall we have descriptive Label here and relevant hotkey?
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 should make a key for the zoom that can override the default yes
app/keymaps/linux.json
Outdated
"pane:close":"Ctrl+Shift+W", | ||
|
||
"editor:undo":"Ctrl+Shift+Z", | ||
"editor:redo":"Ctrl+Shift+Z", |
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 guess this should change to a different key. Ctrl+Y is regularly used as redo, so Ctrl+Shift+Y? Same for the Windows keymap.
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.
Yeah.
Meaning?
On Wed, Mar 1, 2017 at 8:04 PM Benjamin Staneck ***@***.***> wrote:
This PR looks like a massacre 🗡
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#1509 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAy8Xyt3DFaj2myQN1EhiHtrU-1_PqLks5rhj_SgaJpZM4MBKRT>
.
|
@ppot "Allowing the keymap to be change is a different issue and this one.". You mean Plugins can't use it yet ? |
@chabou Yes, I didn't made plugins be able to update the keymap. Since I have no use case of plugins needing some keybinding. If you have a plugin in head needing this. I can test and update it. |
@ppot the cases for plugins to maintain hotkeys is hotkeys packs. For people migrating from iTerm2 there will be a package hyper-iterm2-hotkeys and similar |
My plugin hyper-pane need some keybindings : I have chosen the same way than @iamstarkov to attach my keys. |
yep, hyper-pane case is legit |
It would be great to register to RegisterKeys exported function should be evaluated after every config change. I have a good idea of what plugins need. But maybe it should take place in another PR, after this one have been merged. |
@ppot another thing about allowing plugins to influence keymap is that, right now plugins doesnt override hyper's hotkeys. lets say, its enough for me to switch tabs with paneNavigation: {
navigation: {
up: 'command+option+up',
down: 'command+option+down',
left: 'command+option+left',
right: 'command+option+right'
},
}, but as far as hyper's electron menu's shorcuts has prio over mousetrap hotkeys, it doesnt work out. I believe its valid use case. |
demo of aforementioned case chabou/hyper-pane#6 |
Keymaps used to be case sensitive, leading to a small handful of bugs (minimization in windows), and making custom key mapping more difficult.
Wondering if this project is actively maintained? It seems impossible there are this many open issues referencing the same problem, with a user submitted PR, which goes weeks without any activity. I've kind of given up on waiting and decided I'll just live with the stock Windows terminal. What is the point in putting out binaries for all the other platforms other than MacOS if you can't even reverse-i-search in Bash? |
Reinforcing what @coccyx just mentioned. |
Dereinforcing what others have mentioned, I'd like to thank @ppot and anyone else that worked on this ticket! I eagerly await a release with these changes and don't mind using my dumb old terminal for now. |
I just want to take a minute to say that Hyper is always being talked about by the core team in the zeit.chat slack channel. It's a tough one because we all have full-time jobs and ZEIT are super focused and busy working on the things that maintain their growth for now. They (ZEIT) actively try and find time to work on Hyper. Keymaps is a big PR and is hard to review properly, so I just want everyone to know that it is being talked about every day. ❤️ |
Good news. Part 2 is in master with #1876! |
|
||
<h2 id="keymaps"><a href="#keymaps">Keymaps</a></h2> | ||
|
||
<P> All commands keys can be changed. In order to change them, edit |
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.
All command keys can be changed
*
<h2 id="keymaps"><a href="#keymaps">Keymaps</a></h2> | ||
|
||
<P> All commands keys can be changed. In order to change them, edit | ||
<code>~/.hyper/config.js</code> and add to <code>keymaps</code> your desired change.</p> |
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.
add your desired change to <code>keymaps</code>
*
<code>~/.hyper/config.js</code> and add to <code>keymaps</code> your desired change.</p> | ||
<p> Then Hyper will change the default with your custom change.</p> | ||
|
||
<p> Exemple: <code>'window:devtools': 'Cmd+Alt+O'</code> <p> |
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.
Example
*
As it was integrated. Closing the PR. |
Keymaps Feature
On this implementation, I included a base of Keymap following three specific files.
This way, the Keymap will be easier to manage using accelerator. Since we want the Keymap to be easily modified and not forcing the remplacement of metaKey depending of the operating system.
New file structure
New DEV structure
You can now do development when running Hyper locally and the
DEV
folder will not be created in the production build.hyper/DEV/config.js
Resolve
#233 Tmux bind `
#657 make keyboard shortcuts configurable
#783 Rich Support for Tweaking Modifier Keys
#833 Most common readline keybinding don't work (ctrl-a, ctrl-e, ctrl-w etc.)
#872 Flexible keymap (hotkeys / shortcut)
#1069 Ctrl+X not working in nano
#1100 CTRL+a does not work in tmux under Linux
#1120 1.0.0 release broke some keybindings
#1178 Change realod accelerator
#1185 Shortcuts break when using Alt key as Meta
#1199 Ctrl + W closes the terminal
#1200 [windows] Control characters not working!
#1279 Git automerge - nano edit fail
#1361 Hyperterm doesn't handle Alt key combinations correctly
#1424 Running nano from Hyper on Windows, doesn't allow me to exit with CTRL+X.
#1584 Plugins Existences
#1589 Crashes on open with invalid config
#1627 close on CTRL-W
#1776 Gaze is adding all folders in HOME to watch list
#1782 JOE Editor and Hyper, disabling shortcuts for proper use