Anomalies in keyboard shortcuts for menus on Mac
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Anomalies in keyboard shortcuts for menus on Mac
I am trying to attach keyboard shortcuts to menus using the Menu Builder. I find that there are inconsistencies, especially in the way the shift key is applied. To exemplify the problem, I have created several screenshots of what I set up and the resultant keyboard combination that works successfully. Any ideas why i get the anomaly appreciated.
I am using Indy 9.5.0 using Catalina.
I am using Indy 9.5.0 using Catalina.
Kaveh
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Anomalies in keyboard shortcuts for menus on Mac
The Shift key alters the availability of "/".
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: Anomalies in keyboard shortcuts for menus on Mac
Thanks Richard. So "/" is a special key?
I tried another key combination, setting
Command Shift d
this is envoked correctly by "Command shift d". But setting Command-d is not triggered by any key combination
I tried another key combination, setting
Command Shift d
this is envoked correctly by "Command shift d". But setting Command-d is not triggered by any key combination
Kaveh
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Anomalies in keyboard shortcuts for menus on Mac
Kaveh.
Cmd-Shift-d (ASCII 68) is the same as shift-d (ASCII 68), at least as the rawKey message is concerned. In other words, to rawKey, the CMD key may as well not exist.
I am not sure how you are working this, but you may need to test the state of the "control" keys in conjunction to identifying a keypress. LC itself knows when the CMD key is pressed.
Craig
Cmd-Shift-d (ASCII 68) is the same as shift-d (ASCII 68), at least as the rawKey message is concerned. In other words, to rawKey, the CMD key may as well not exist.
I am not sure how you are working this, but you may need to test the state of the "control" keys in conjunction to identifying a keypress. LC itself knows when the CMD key is pressed.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Anomalies in keyboard shortcuts for menus on Mac
FWIW I tried a few of these combos on Linux and was unable to reproduce the results you're seeing. While I realize you reported seeing that in Mac, Linux is often a good test case for GUI anomalies given how relatively little attention it gets compared to Mac, as just about everyone there uses Macs daily.
I'll see if I can make some time to explore this further on my Mac over the weekend. In the meantime, it may be helpful to double-check that you have no frontscripts or other handlers which may be interfering with your test.
It would help encourage others to test what you're seeing if you can post a simple example stack that exhibits the errant behavior.
I'll see if I can make some time to explore this further on my Mac over the weekend. In the meantime, it may be helpful to double-check that you have no frontscripts or other handlers which may be interfering with your test.
It would help encourage others to test what you're seeing if you can post a simple example stack that exhibits the errant behavior.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: Anomalies in keyboard shortcuts for menus on Mac
Thanks for your time Richard. Here is a "very" minimal stack. I have set the shortcut for the menu item to Command Shift /. The menu item triggers when I press Command /, but not when Shift is down.
- Attachments
-
- testing_shortcuts.zip
- (866 Bytes) Downloaded 167 times
Kaveh
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Anomalies in keyboard shortcuts for menus on Mac
Thanks, Kaveh. Very helpful to have the example stack. I'll poke around on my Mac later and let you know what I find.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Anomalies in keyboard shortcuts for menus on Mac
Menu Builder:
This is not an anomaly but what we need to use shift-chars (that is you need shift to have it) or alt-chars (that is you need option/alt to have it) or both.
For example, if you have a key on your keyboard that has "/" as lower char and "?" as shift-char. Then
This is not an anomaly but what we need to use shift-chars (that is you need shift to have it) or alt-chars (that is you need option/alt to have it) or both.
For example, if you have a key on your keyboard that has "/" as lower char and "?" as shift-char. Then
- builder: cmd + "/" --> fires
- builder: cmd + shift + "/" --> doesn't fire because "/" is not a shift-char (actually you use cmd + "?")
- builder: cmd + "?" --> fires (actually you use cmd + shift + "/" to trigger it with our key example)
- builder: cmd + shift + "?" --> fires
shiftLock happens
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: Anomalies in keyboard shortcuts for menus on Mac
Thanks for that. I think I will just stick to alphabetic characters. I can then used upper and lower case chars for shortcuts which is useful. I note that I can't replace shortcuts currently in use by the application either, e.g. command n. But that is fine.
Kaveh