Page 5 of 5

Re: Assigning a keyboard shortcut to a button

Posted: Sat Feb 12, 2022 4:41 pm
by richmond62
SShot 2022-02-12 at 17.40.18.png

Re: Assigning a keyboard shortcut to a button

Posted: Sat Feb 12, 2022 5:54 pm
by richmond62

Re: Assigning a keyboard shortcut to a button

Posted: Mon Feb 14, 2022 2:26 pm
by glenn9
jacque wrote: Fri Feb 11, 2022 11:03 pm Now 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
Thanks Jacque, have just seen this, I'll give this a try... Regards, Glenn

Re: Assigning a keyboard shortcut to a button

Posted: Mon Feb 14, 2022 3:40 pm
by glenn9
glenn9 wrote: Mon Feb 14, 2022 2:26 pm
jacque wrote: Fri Feb 11, 2022 11:03 pm Now 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
Thanks Jacque, have just seen this, I'll give this a try... Regards, Glenn
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!!

Grateful for the suggestion though.

Regards,

Glenn

Re: Assigning a keyboard shortcut to a button

Posted: Mon Feb 14, 2022 8:56 pm
by jacque
Have you double-checked that my two keycodes are correct? I just copied them from Richmond's post, but maybe yours are different.