Menu

#1502 Many Look and Feel jars are not picking up Mac OS keyboard shortcuts in popup dialogs

SQuirreL
open
None
medium
2022-07-03
2022-06-11
Zheng Wang
No

The default MAC OS (I am using version 12.4 Monterey) keyboard shortcuts for copy/cut/paste is Command+C/X/V.

In popup dialogs, like when modifying an alias details, Look and Feel jars like Metal are not using the MAC OS shortcuts. For example, shortcut for cut is still Control + X (instead of Command + X). This is the case even after setting shortcuts in File > Global Preferences > Keyboard shortcuts to be MAC OS ones, like setting Valid shortcut of 'cut-to-clipboard' to 'meta X'.

Some jars like Max OS X, JTatoo, or Radiance, do use the MAC OS shortcuts, but personally I have been loving to use Metal jar.

Is there any way to change the shortcuts for one specific Look and Feel jar like Metal? Or make the jar respect the global setting (File > Global Preferences > Keyboard shortcuts)?

Discussion

  • Zheng Wang

    Zheng Wang - 2022-06-11

    Sorry, forgot to mention. The Squirrel SQL Client I am using is of version 4.4.0.

     
  • Zheng Wang

    Zheng Wang - 2022-06-14

    @gerdwagner thanks for the quick response.

    I checked the snapshot on Magic Keyboard, with the Metal jar. Copy/cut/paste is now working in popup dialogs via Apple Command+C/X/P, but other shortcuts like undo (Command+Z) and redo (Command+Shift+Z) are not working (even if the global settings Undo and Redo are configured to meta Z and shift meta Z respectively). It feels like the Metal jar has hard coded shortcuts. Is it possible to make it fetch shortcut settings from the Mac OS, so that it is consistent with other applications on the same Mac, and able to be configured at OS level?

    I also used Mac with Windows keyboard, and the Windows key was mapped by default to the Apple Command key which was same as yours. So I guess this is common.

     
  • Gerd Wagner

    Gerd Wagner - 2022-06-14

    Concerning exiting standard keys e.g. for cut/copy/paste:
    The changes are committed to our GIT repository and will be available in future snapshots and version. Excerpt from change log:
    '#1502 MAC OS with Metal Look and Feel:
    Standard keyboard shortcuts (cut, copy, paste) of simple text fields where changed from ctrl+X/C/V to command+X/C/V.
    Note: If you use Mac with Windows keyboard the command key is mapped to the Windows key.

    As to undo, redo: For simple text fields these functions aren't supported at all independent on the QS. I'll see if I can implement this functionality.
    How about the SQL editor does undo/redo work for you there? (Possibly after manipulating Global Preferences > Keyboard shortcuts.)

     
  • Zheng Wang

    Zheng Wang - 2022-06-15

    @gerdwagner thanks for the code changes. Really appreciate it.

    In SQL editor, undo works (in both 4.4.0 and the snapshot) with Command+Z, but redo is not working by Shift+Command+Z, even if the Redo in Global Preferences is set. I haven't figured out how to achieve Redo. Is it a missing feature actually?

    By the way, Home and End keys by default make the cursor go to the start/end of document instead of line on Mac. I used steps from https://damieng.com/blog/2015/04/24/make-home-end-keys-behave-like-windows-on-mac-os-x/ to change them to be 'go to start/end of line'. It works in other applications like TextEdit and Chrome on Mac, but not working in the SQL editor of SquirrelSQLClient. Is there anyway for the Metal look and feel to support this?

     

    Last edit: Zheng Wang 2022-06-15
  • Gerd Wagner

    Gerd Wagner - 2022-06-21

    Undo and redo shortcuts can now be changed for the SQL editor. Excerpt from change log:
    Made undo (ctrl+Z) and redo (ctrl+R) shortcuts changeable
    at menu File --> Global Preferences --> tab Keyboard shortcuts.

    The changes are available in snapshot-20220621_2227.

     

    Last edit: Gerd Wagner 2022-06-21
  • Zheng Wang

    Zheng Wang - 2022-06-22

    Thanks. I tried snapshot-20220621_2227. Undo and Redo are working in SQL Editor using command+Z and shift+command+Z (configured in Global Preferences).

     
  • Gerd Wagner

    Gerd Wagner - 2022-07-03

    On "Home and End keys":
    Committed the following change (excerpt from change log):
    '#1502 MAC OS: Made some standard navigation keyboard short cuts available for configuration.
    See menu File --> Global Preferences --> tab Keyboard shortcuts,
    entries caret-begin, caret-begin-line, caret-end, caret-end-line

    Will be available in future snapshots and versions.

     
  • Zheng Wang

    Zheng Wang - 2022-07-03

    Great job. Thanks.

     

Log in to post a comment.