Numeric Pad's ENTER key ?

How can be this controlled in that simulator? Can HIDmacros be used with this application?
Post Reply
lulu
Posts: 8
Joined: 30 Jun 2016, 21:18

Numeric Pad's ENTER key ?

Post by lulu » 24 Apr 2017, 23:41

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

admin
Site Admin
Posts: 425
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Numeric Pad's ENTER key ?

Post by admin » 25 Apr 2017, 08:06

Are you talking about input side (macro trigger) or output side (some SendKey command)?
Petr Medek
HIDmacros author

lulu
Posts: 8
Joined: 30 Jun 2016, 21:18

Re: Numeric Pad's ENTER key ?

Post by lulu » 25 Apr 2017, 15:22

I hope this clarifies my question :
Image

admin
Site Admin
Posts: 425
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Numeric Pad's ENTER key ?

Post by admin » 26 Apr 2017, 07:56

Somehow can't see the image...
Petr Medek
HIDmacros author

lulu
Posts: 8
Joined: 30 Jun 2016, 21:18

Re: Numeric Pad's ENTER key ?

Post by lulu » 27 Apr 2017, 16:52

That's strange and unfortunate. Here is a download link : https://we.tl/8C3FED1VcZ

admin
Site Admin
Posts: 425
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Numeric Pad's ENTER key ?

Post by admin » 28 Apr 2017, 07:57

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
Petr Medek
HIDmacros author

admin
Site Admin
Posts: 425
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Numeric Pad's ENTER key ?

Post by admin » 12 Jul 2017, 21:43

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.

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
HIDmacros author

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest