1

I am using shortcut keys with QActions and specific key shortcuts(like F1, Command+A) does not respond in Mac . Seems like Mac is reserving those shortcut keys for OS specific shortcuts. Is it possible to override those and use the qt defined shortcuts .

I tried using setShortcutContext(Qt::ApplicationShortcut);

But does not work.

Rubina
  • 123
  • 1
  • 17
  • MacOS/X very well may be stealing those key-combinations for itself -- check the Keyboard->Shortcuts tag in your System Preferences window to see if it is. If it is, there's nothing much you can do about it, other than changing the mapping in Keyboard->Shortcuts to something else. MacOS/X gets first dibs, and if it uses a key-combo for its own purposes, then that key-combo never gets delivered to your process at all, which means that Qt can't do anything about it. – Jeremy Friesner Apr 21 '18 at 00:14
  • Those keys are not bound by the OS by default. Check that they haven't been bound to something in the system settings, and that Qt isn't overriding your bindings. (F1 is usually Help, Command+A is "Select All". Remapping them can confuse your users.) – molbdnilo Apr 21 '18 at 04:46
  • Yes they are bound . So in Mac I can't remap those keys for my qt application? In windows same keys can remapped in qt application, I thought Mac also those the same but looks like it does not – Rubina Apr 21 '18 at 14:10

0 Answers0