Assigning a keyboard shortcut to a button
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 10098
- Joined: Fri Feb 19, 2010 10:17 am
Re: Assigning a keyboard shortcut to a button
- Attachments
-
- Key Reporter 2.livecode.zip
- Stack.
- (1.09 KiB) Downloaded 162 times
-
- Livecode Opensource Backer
- Posts: 10098
- Joined: Fri Feb 19, 2010 10:17 am
Re: Assigning a keyboard shortcut to a button
Thanks Jacque, have just seen this, I'll give this a try... Regards, Glennjacque wrote: ↑Fri Feb 11, 2022 11:03 pmNow that I'm at the computer I see the problem. Here's a revised script that should account for either one of the alt keys.Code: Select all
on rawkeyDown pKey put (65513 is in the keysdown or 65514 is in the keysdown) into tAltKeyTrue if tAltKeyTrue and pKey = 115 then answer "alt" else pass rawkeydown end if end rawkeyDown
Re: Assigning a keyboard shortcut to a button
Hi Jacque, just tried your code.... I think it must be my set up as it again only fires when the 'Alt Gr' key is down!!glenn9 wrote: ↑Mon Feb 14, 2022 2:26 pmThanks Jacque, have just seen this, I'll give this a try... Regards, Glennjacque wrote: ↑Fri Feb 11, 2022 11:03 pmNow that I'm at the computer I see the problem. Here's a revised script that should account for either one of the alt keys.Code: Select all
on rawkeyDown pKey put (65513 is in the keysdown or 65514 is in the keysdown) into tAltKeyTrue if tAltKeyTrue and pKey = 115 then answer "alt" else pass rawkeydown end if end rawkeyDown
Grateful for the suggestion though.
Regards,
Glenn
Re: Assigning a keyboard shortcut to a button
Have you double-checked that my two keycodes are correct? I just copied them from Richmond's post, but maybe yours are different.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com