Hi Petr,
Is there a way to distinguish within Lua Macros between the ENTER key and the NUMPAD_ENTER key?
My destination software considers the first one to be "RETURN" and the second one "ENTER" which gives me the ability to assign two different behaviors.
But when I hit the corresponding NUMPAD_ENTER key, Lua Macros sends what is detected as "RETURN", not what should be, detected as "ENTER".
Do you know how to address this?
Thanks!
Lulu
Numeric Pad's ENTER key ?
Re: Numeric Pad's ENTER key ?
Are you talking about input side (macro trigger) or output side (some SendKey command)?
Petr Medek
LUAmacros author
LUAmacros author
Re: Numeric Pad's ENTER key ?
That's strange and unfortunate. Here is a download link : https://we.tl/8C3FED1VcZ
Re: Numeric Pad's ENTER key ?
Now I can see picture even in your original post.
So we talk about input side.
If you receive enter key from both keys then no - luamacros can't distinguish now.
Someone was asking here in forum to make macro triggers recognize virtual key codes instead of their representation by keyboard's regional settings. That would probably solve also this issue.
Feel free to create feature request issue here: https://github.com/me2d13/luamacros/issues
So we talk about input side.
If you receive enter key from both keys then no - luamacros can't distinguish now.
Someone was asking here in forum to make macro triggers recognize virtual key codes instead of their representation by keyboard's regional settings. That would probably solve also this issue.
Feel free to create feature request issue here: https://github.com/me2d13/luamacros/issues
Petr Medek
LUAmacros author
LUAmacros author
Re: Numeric Pad's ENTER key ?
Callback function enhanced in LuaMacros version 0.1.1.9 released on July 12th 2017.
Actually the keycode is virtual key code but windows sends value 13 fr both enters. What is different is value of "Flag" attribute and this value can be now passed to callback function (as additional argument). Play with following code - I was able to recognize both enters now.
Actually the keycode is virtual key code but windows sends value 13 fr both enters. What is different is value of "Flag" attribute and this value can be now passed to callback function (as additional argument). Play with following code - I was able to recognize both enters now.
Code: Select all
print(lmc_device_set_name('KBD1', '3970CC3F'))
log_handler = function(button, direction, flags)
print('Callback for device: button ' .. button .. ', direction '..direction..', flags '..flags)
end
lmc_set_handler('KBD1', log_handler)
Petr Medek
LUAmacros author
LUAmacros author