Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Overriding Core key bindings #4764

Closed
hadronized opened this issue Dec 25, 2014 · 15 comments
Closed

Overriding Core key bindings #4764

hadronized opened this issue Dec 25, 2014 · 15 comments

Comments

@hadronized
Copy link

I tried to override Core keybindings (ctrl-alt-p and ctrl-alt-[) but it doesn’t work. I use the unbound! and native! strings, none works :( Any idea?

Furthermore, ctrl-alt-p is bound to the package specs command, which I don’t give a heck. How could I disable that? Thanks!

@izuzak
Copy link
Contributor

izuzak commented Dec 25, 2014

Have you tried using unset!? It would also be helpful if you could share the contents of your keymap.cson file so that it's more clear what you tried exactly.

Also, Atom version, OS version and similar information is always helpful.

@hadronized
Copy link
Author

Atom 0.162.0, Windows 10 Preview, keymap.cson:

'.workspace':
  'ctrl-alt-p': 'native!'
  'ctrl-alt-]': 'native!'

@izuzak
Copy link
Contributor

izuzak commented Dec 25, 2014

Can you share a screenshot of the output of the Keybinding Resolver when you hit ctrl-alt-p?

https://github.com/atom/atom/blob/master/docs/debugging.md#check-the-keybindings

@hadronized
Copy link
Author

It resolves to both mine and the core one. I'll provide a screenshot later on.

@hadronized
Copy link
Author

I can’t use any hosting image service (ffs internet provider…), then I’ll just paste the output here @izuzak:

(in green) window:run-package-specs  body    c:\…\win32.json
(in grey) unset!   .workspace    c:\...\keymap.cson

@hadronized
Copy link
Author

Yeah ok, nvm, it’s a fucking hell. Going back to Sublime Text 3. I can’t even correctly override basic keybindings.

@izuzak
Copy link
Contributor

izuzak commented Dec 25, 2014

@phaazon Sorry for the frustration -- I misunderstood what you were trying to do.

This works for me for completely disabling that keybinding (and not unsetting it from a specific selector):

'.workspace':
  'ctrl-alt-p': 'abort!'

@hadronized
Copy link
Author

If I do that, I can’t use the key anymore, because on my layout, alt-gr is bound to &…

@hadronized
Copy link
Author

Ok, seriously, why can’t I use `ctrl-alt-]' (which is located at w on my azerty keyboard)? It does nothing while it should output a``. :(

@hadronized hadronized reopened this Dec 25, 2014
@winstliu
Copy link
Contributor

There's a known bug where Atom can't handle international keyboards (especially ones that have a special AltGr). See more at atom/atom-keymap#35 (AltGr) and atom/atom-keymap#37 (international keyboards).

@izuzak
Copy link
Contributor

izuzak commented Dec 26, 2014

Sorry, I wasn't aware you were using a different layout. As @50Wliu mentioned, you're probably hitting atom/atom-keymap#35 and atom/atom-keymap#37. I'm closing this since the problem is already reported, but let me know if I misunderstood. Thanks for the additional information.

@izuzak izuzak closed this as completed Dec 26, 2014
@hadronized
Copy link
Author

Do you know when that will be properly handled?

@izuzak
Copy link
Contributor

izuzak commented Dec 26, 2014

I don't know when that will be properly handled. The best way to get notified when that happens is to subscribe to those two issues.

@hanslivingstone
Copy link

For anyone else looking for an easier way, just created this package which automatically unbinds anything conflicting with what you set in 'keymap.cson': https://atom.io/packages/keymap-control

@lock
Copy link

lock bot commented Aug 25, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Aug 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants