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)?
Sorry, forgot to mention. The Squirrel SQL Client I am using is of version 4.4.0.
Could you please give this
https://sourceforge.net/projects/squirrel-sql/files/reproductions/bug1502/squirrel-sql-snapshot-20220613_2233-MACOSX-install.jar/download
snapshot a try an let me know if it works for you?
It works on my Mac (Big Sur).
When I connect a Windows keyboard to my Mac I noticed that with the snapshot one has to use Windows-key C/V/X. Do you know if that's common? (I'm not a regular Mac user.)
Thanks in advance
Gerd
@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.
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.)
@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
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
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).
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.
Great job. Thanks.