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

Disable keyboard shortcuts (selectively) #1974

Closed
kytrinyx opened this Issue Aug 13, 2014 · 16 comments

Comments

Projects
None yet
6 participants
@kytrinyx

kytrinyx commented Aug 13, 2014

Is there a way to selectively remap or disable shortcuts?

In almost all the software I use, the key combination control-h (^h) acts as delete. I haven't used backspace for years (and I avoid stack-overflow and other sites where ^h is remapped to mean something else, because it's so incredibly frustrating to type when every typo triggers something rather than deleting stuff).

@stuconnolly

This comment has been minimized.

Show comment
Hide comment
@stuconnolly

stuconnolly Aug 23, 2014

Member

Shortcuts can be changed in OS X's System Preferences under Keyboard.

Member

stuconnolly commented Aug 23, 2014

Shortcuts can be changed in OS X's System Preferences under Keyboard.

@kytrinyx

This comment has been minimized.

Show comment
Hide comment
@kytrinyx

kytrinyx commented Aug 23, 2014

Thanks!

@kytrinyx

This comment has been minimized.

Show comment
Hide comment
@kytrinyx

kytrinyx Sep 4, 2014

I have not figured out how to do this.

I tried looking for existing mappings in System Preferences > Keyboard > Shortcuts
I looked everywhere, but in particular expected to find something under "App Shortcuts".

I unclicked the existing shortcut for "All Applications > Show Help Menu", even though that was mapped to something other than ^-h, but this did not change the behavior of the app.

Since there was nothing there, I also tried adding a new shortcut for Sequel Pro to match the "MySQL Help" menu item, hoping that it would overwrite the existing one, but this did not help either.

annoying-sequelpro-help

kytrinyx commented Sep 4, 2014

I have not figured out how to do this.

I tried looking for existing mappings in System Preferences > Keyboard > Shortcuts
I looked everywhere, but in particular expected to find something under "App Shortcuts".

I unclicked the existing shortcut for "All Applications > Show Help Menu", even though that was mapped to something other than ^-h, but this did not change the behavior of the app.

Since there was nothing there, I also tried adding a new shortcut for Sequel Pro to match the "MySQL Help" menu item, hoping that it would overwrite the existing one, but this did not help either.

annoying-sequelpro-help

@abhibeckert

This comment has been minimized.

Show comment
Hide comment
@abhibeckert

abhibeckert Sep 5, 2014

Member

I've been able to confirm this, the Control-H keyboard shortcut is not using a menu item so it cannot be changed via System Preferences.

I didn't know about ^h... but I use ^d and others all the time and will also be working ^h into my workflow. Thanks!

Member

abhibeckert commented Sep 5, 2014

I've been able to confirm this, the Control-H keyboard shortcut is not using a menu item so it cannot be changed via System Preferences.

I didn't know about ^h... but I use ^d and others all the time and will also be working ^h into my workflow. Thanks!

@abhibeckert abhibeckert reopened this Sep 5, 2014

@dmoagx

This comment has been minimized.

Show comment
Hide comment
@dmoagx

dmoagx Sep 5, 2014

Member

Actually ^H has a menu item (it's in the context menu of the query editor) but yeah, reassigning doesn't work.
bildschirmfoto 2014-09-05 um 10 32 59 260

Member

dmoagx commented Sep 5, 2014

Actually ^H has a menu item (it's in the context menu of the query editor) but yeah, reassigning doesn't work.
bildschirmfoto 2014-09-05 um 10 32 59 260

@abhibeckert

This comment has been minimized.

Show comment
Hide comment
@abhibeckert

abhibeckert Sep 5, 2014

Member

We have "MySQL Help" in the Help menu, I think we should add "MySQL Help for Word" to the Help menu as well, and put the shortcut there.

Also I suspect the NSTextView subclass is actually the one looking for the ^H keypress? Haven't checked... but if so, we could just remove that once there is a help for word menu item.

Member

abhibeckert commented Sep 5, 2014

We have "MySQL Help" in the Help menu, I think we should add "MySQL Help for Word" to the Help menu as well, and put the shortcut there.

Also I suspect the NSTextView subclass is actually the one looking for the ^H keypress? Haven't checked... but if so, we could just remove that once there is a help for word menu item.

@kytrinyx

This comment has been minimized.

Show comment
Hide comment
@kytrinyx

kytrinyx Sep 5, 2014

I didn't even realise there was a context menu for the query editor, that makes sense.

Thanks for taking the time to dig into this, @abhibeckert

kytrinyx commented Sep 5, 2014

I didn't even realise there was a context menu for the query editor, that makes sense.

Thanks for taking the time to dig into this, @abhibeckert

abhibeckert added a commit that referenced this issue Sep 6, 2014

Merge pull request #1981 from abhibeckert/master
Resolve #1974:  Allow un-mapping of Ctrl-H
@abhibeckert

This comment has been minimized.

Show comment
Hide comment
@abhibeckert

abhibeckert Sep 6, 2014

Member

@kytrinyx Shortly there will be a new nightly build (http://nightly.sequelpro.com/) with a menu item in the Help menu that you can change the shortcut of.

Note it has two titles, depending whether any text is currently selected in the editor. So you need to define it twice, like this:

screen shot 2014-09-06 at 2 22 58 pm

Member

abhibeckert commented Sep 6, 2014

@kytrinyx Shortly there will be a new nightly build (http://nightly.sequelpro.com/) with a menu item in the Help menu that you can change the shortcut of.

Note it has two titles, depending whether any text is currently selected in the editor. So you need to define it twice, like this:

screen shot 2014-09-06 at 2 22 58 pm

@kytrinyx

This comment has been minimized.

Show comment
Hide comment
@kytrinyx

kytrinyx Sep 6, 2014

I'm so excited about this. Thanks so much for fixing it!

kytrinyx commented Sep 6, 2014

I'm so excited about this. Thanks so much for fixing it!

@kytrinyx

This comment has been minimized.

Show comment
Hide comment
@kytrinyx

kytrinyx Sep 8, 2014

It works beautifully.

kytrinyx commented Sep 8, 2014

It works beautifully.

@thisiswei

This comment has been minimized.

Show comment
Hide comment
@thisiswei

thisiswei May 4, 2015

@kytrinyx @abhibeckert Awesome! I just ran into the same problem, what do I need to do to remap ^H to delete?

thisiswei commented May 4, 2015

@kytrinyx @abhibeckert Awesome! I just ran into the same problem, what do I need to do to remap ^H to delete?

@kytrinyx

This comment has been minimized.

Show comment
Hide comment
@kytrinyx

kytrinyx May 4, 2015

@thisiswei if you get the nightly build then you need to change the two shortcuts listed above (help for word, help for selection). Once those are defined to be something other than ^h, then ^h for deletion will work.

kytrinyx commented May 4, 2015

@thisiswei if you get the nightly build then you need to change the two shortcuts listed above (help for word, help for selection). Once those are defined to be something other than ^h, then ^h for deletion will work.

@thisiswei

This comment has been minimized.

Show comment
Hide comment
@thisiswei

thisiswei May 4, 2015

@kytrinyx Great! Do you experience any problems with the nightly build?

thisiswei commented May 4, 2015

@kytrinyx Great! Do you experience any problems with the nightly build?

@kytrinyx

This comment has been minimized.

Show comment
Hide comment
@kytrinyx

kytrinyx May 5, 2015

@thisiswei No I update regularly and have never experienced any problems.

kytrinyx commented May 5, 2015

@thisiswei No I update regularly and have never experienced any problems.

@thisiswei

This comment has been minimized.

Show comment
Hide comment
@thisiswei

thisiswei commented May 5, 2015

@kytrinyx Great!

@twlz0ne

This comment has been minimized.

Show comment
Hide comment
@twlz0ne

twlz0ne Feb 17, 2016

defaults write com.sequelpro.SequelPro NSUserKeyEquivalents '{
    "MySQL Help for Selection" = "@^h";
    "MySQL Help for Word" = "@^h";
    "back-word" = "^h";
}'

twlz0ne commented Feb 17, 2016

defaults write com.sequelpro.SequelPro NSUserKeyEquivalents '{
    "MySQL Help for Selection" = "@^h";
    "MySQL Help for Word" = "@^h";
    "back-word" = "^h";
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment