Skip to content

Disable keyboard shortcuts (selectively) #1974

Closed

Description

@kytrinyx

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).

Activity

  1. stuconnolly commented on Aug 23, 2014

    @stuconnolly
    Member

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

  2. kytrinyx commented on Aug 23, 2014

    @kytrinyx
    Author

    Thanks!

  3. kytrinyx commented on Sep 4, 2014

    @kytrinyx
    Author

    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

  4. abhibeckert commented on Sep 5, 2014

    @abhibeckert
    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!

  5. dmoagx commented on Sep 5, 2014

    @dmoagx
    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

  6. abhibeckert commented on Sep 5, 2014

    @abhibeckert
    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.

  7. kytrinyx commented on Sep 5, 2014

    @kytrinyx
    Author

    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

  8. added a commit that references this issue on Sep 6, 2014
    c49bbd2
  9. added a commit that references this issue on Sep 6, 2014
    29be076
  10. abhibeckert commented on Sep 6, 2014

    @abhibeckert
    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

  11. kytrinyx commented on Sep 6, 2014

    @kytrinyx
    Author

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

  12. kytrinyx commented on Sep 8, 2014

    @kytrinyx
    Author

    It works beautifully.

  13. thisiswei commented on May 4, 2015

    @thisiswei

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

  14. kytrinyx commented on May 4, 2015

    @kytrinyx
    Author

    @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.

  15. thisiswei commented on May 4, 2015

    @thisiswei

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

  16. kytrinyx commented on May 5, 2015

    @kytrinyx
    Author

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

  17. thisiswei commented on May 5, 2015

    @thisiswei

    @kytrinyx Great!

  18. twlz0ne commented on Feb 17, 2016

    @twlz0ne
    defaults write com.sequelpro.SequelPro NSUserKeyEquivalents '{
        "MySQL Help for Selection" = "@^h";
        "MySQL Help for Word" = "@^h";
        "back-word" = "^h";
    }'
  19. killrazor commented on Apr 30, 2020

    @killrazor

    Came here to find ⌘ + return to execute a query (like MySQL Workbench).

    Found that I can map using mac Key bindings with the names of Run Current Query and Run Previous Query.

    If you want to do it how @twlz0ne suggested it would be:

     defaults write com.sequelpro.SequelPro NSUserKeyEquivalents '{
            "Run Current Query" = "@\\U21a9";
            "Run Previous Query" = "@\\U21a9";
        }'
    

    Note: you may have to restart the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions