Home key async alternative

For some reason in keydown events [quote]Keyboard.AsyncKeyDown(&h73)[/quote] (which is home) and other async s are not working anymore on windows or mac.
If you have an idea about why async is not working anymore, that would be good also.
Alternatively how do I detect in keydown for “home” and “end”?

in the KEYDOWN event… why not just look at the ASCB(key) instead?
now the value will be different… I believe home is &H1D (30) not (&H73)

If ASCB(key)=&H1D then 
msgbox "you pressed home"
end if

Thanks. I also had [quote]Keyboard.AsyncControlKey[/quote] in the line and I forgot to not test that if statement, but line after

In the keydown event, why are you insisting on getting Keyboard.AsyncKeyDown when you have key especially there to report the pressed key ?

Somewhere I’d seen async was faster or better.
Also the home key value reported is “r” or 01 in binary.
If you have an alternative, it’s welcome

Ok… you have been given an alternative… you seem to feel that this alternative is bogus… strange since I have been using it for more years than I can count.

In Keydown, you already HAVE the key… so why waste “time” getting it again?
Asynch is a moment in time… which is fine for keyboard scanners (outside of Keydown), or looking at keys that don’t fire a keydown event (Shift, Cmd, Ctrl etc)

and you are correct that [HOME] returns &H01…(also ctrl-A)
it was Up Arrow that is &H1E
for the record

  • right arrrow is &H1D
  • left arrow is &H1C
  • down arrow is &H1F

so for [HOME] look for &H01 and NO Ctrl Key to distingush from Ctrl-A which WILL have Asynch Ctrl Key

Sorry. I wanted the alternative to asynch

the async key down checkers also don’t work when you’re connected via screen sharing, so you should use the non-async versions. Use the passed value when it’s available in a key down event and if you need to check for modifiers use the non-async versions, keyboard.commandkey, keyboard.controlKey etc.

You got bad information. In a KeyDown event, you should NEVER use the Async versions. Outside of KeyDown, you can ONLY use the async versions. There is a clear delineation.

You should never use Async inside of Keydown EXCEPT to detect Shift/Cmd/Ctrl

No, you should never use async inside KeyDown to test for Shift/Cmd/Ctrl. The state of those keys are captured for you at the precise moment of the keypress. The actual KeyDown event may be processed a fraction of a second later and the async state of the keys might be different. A fast typist can get ahead of KeyDown. The events can get queued up and the Async values can get out of sync with what actually happened.

You don’t seem to understand that in keydown, you should use the key property. That is the only serious way to proceed. you instance on async is the error. Speed for the keyboard is ridiculously irrelevant. Even the fastest keypress is something like 1/25th a second. But hey, do as you please and suffer for it if you like that.