Isn't it possible to set Cmd-Shift-1 as keyboard shortcut for a menu item?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
japino
Posts: 78
Joined: Sun Oct 14, 2012 10:56 am

Isn't it possible to set Cmd-Shift-1 as keyboard shortcut for a menu item?

Post by japino » Sun Apr 05, 2020 3:19 pm

I'm creating a standalone app for use on a Mac. I have a menu with 4 menu items.
Menu item 1 uses Cmd-1
Menu item 2 uses Cmd-2
Menu item 3 uses Cmd-Shift-1
Menu item 4 uses Cmd-Shift-2

At least.... that what's I would like them to be.

But the menu displays:
Menu item 1: Cmd-1
Menu item 2: Cmd-2
Menu item 3: Cmd-1
Menu item 4: Cmd-2

When I use Cmd-Shift-G and Cmd-Shift-B respectively for menu items 3 and 4, I do get expected shortscuts in the menu:
Menu item 1: Cmd-1
Menu item 2: Cmd-2
Menu item 3: Cmd-Shift-G
Menu item 4: Cmd-Shift-B

Why can't I set Cmd-Shift-1 or 2 as keyboard shortcut for a menu item?

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Isn't it possible to set Cmd-Shift-1 as keyboard shortcut for a menu item?

Post by Klaus » Sun Apr 05, 2020 3:23 pm

On a german keyboard:
SHIFT-1 = !
SHIFT-2 = "

So there is no CMD-SHIFT-1 actually, but CMD-!, maybe that is the reason?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Isn't it possible to set Cmd-Shift-1 as keyboard shortcut for a menu item?

Post by richmond62 » Sun Apr 05, 2020 5:34 pm

This 'thing' about CMD-SHIFT-1 has already been mentioned elsewhere by the same OP.
-
Commander.png
Commander.png (12.34 KiB) Viewed 2789 times
-
Mind you, inside LiveCode, at least, SHIFT-CMD-anything is a problem.

Code: Select all

on rawKeyUp RP
   put RP into fld "ff"
   if the commandKey is down then
      put "CMD " before fld "ff"
   end if
   if the shiftKey is down then
      put "SH " before fld "ff"
   end if
   if the altKey is down then
      put "ALT " before fld "ff"
   end if
end rawKeyUp
Attachments
COMMANDER.livecode.zip
Here's the stack.
(925 Bytes) Downloaded 204 times

japino
Posts: 78
Joined: Sun Oct 14, 2012 10:56 am

Re: Isn't it possible to set Cmd-Shift-1 as keyboard shortcut for a menu item?

Post by japino » Sun Apr 05, 2020 6:34 pm

Thanks Klaus and Richmond!
This 'thing' about CMD-SHIFT-1 has already been mentioned elsewhere by the same OP.
Uhh, did I really talk about this before? May be I did, my memory fails me (wouldn't be the first time). :shock:
Mind you, inside LiveCode, at least, SHIFT-CMD-anything is a problem
Yes, and I guess I sort of understand why now. (Actually I had "Option" instead of "Shift" at first. I wanted to use "Command-Option-1" and I didn't get that to display in the menu either.)

Because I couldn't figure this one out at first and I didn't want to use other keyboard shortcuts, I changed the way my app works, so that now I don't need those extra commands in the menu.

Post Reply