Page 1 of 1

Use LuaMacros with scan codes or key codes?

Posted: 17 Mar 2017, 12:52
by TSL
Is it possible to use LuaMacros to intercept keys by scan code or by key code, instead of by the key output? I am looking to do this for a language-independent task, so that the macros are tied to actual keys and do not change when the system language is changed.

Thank you

Re: Use LuaMacros with scan codes or key codes?

Posted: 20 Mar 2017, 09:54
by admin
Interesting idea. In fact we have some issues caused by regional keyboard settings so this would also help.
Anyone else interested? :-)

Re: Use LuaMacros with scan codes or key codes?

Posted: 21 Mar 2017, 09:15
by csadi0011
So this:
button == 78
instead of this:
button == string.byte('N')

Or I misunderstood?

Re: Use LuaMacros with scan codes or key codes?

Posted: 22 Mar 2017, 09:08
by admin
string.byte does just conversion to number (ascii code).
The change would be specific key will return always the same value (VK key code) with any national keyboard set in Windows.

Re: Use LuaMacros with scan codes or key codes?

Posted: 26 Mar 2017, 12:36
by csadi0011
That's right.

Re: Use LuaMacros with scan codes or key codes?

Posted: 27 Mar 2017, 12:40
by spdyvkng
I think using a scan code would be wonderful. There are a lot of software that assumes specific characters (Adobe software) which gets unreachable on national keyboards, or you sit around wondering how do I do this shortcut.