Can I remap odd macro keys?

Announcements, questions
Post Reply
PestilenceKills
Posts: 1
Joined: 03 Dec 2017, 10:36

Can I remap odd macro keys?

Post by PestilenceKills » 03 Dec 2017, 13:13

Hi,

So I've got a USB keypad that has ( , ) and = keys on it. In Word/Notepad they type exactly that - however, in another piece of software I use, if I try and set them as shortcuts, all three register as Alt+NUM 0.

They seem to work by simulating holding Alt and typing in the ASCII code - so '(' is ALT+4+0 (which is 18 + 100 + 96) - but they register the keys really strangely. I wrote a script to print out what's happening, and it shows this for '(':

96 pressed
96 released
100 pressed
100 released
96 pressed
18 released
96 released

So 18 (Alt) is never registered as being pressed.

I've managed to script as far as recognising when the sequence has happened (96 + 100 + 96, then 18 being released), but because it's only registering the release of the last key, I can't map what that combination presses - and if I just remap the presses, I get Alt being released at the end, which opens the menu bar.

Is there any way to make this work?

Thanks in advance!

Steve

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

Re: Can I remap odd macro keys?

Post by admin » 04 Dec 2017, 09:24

Unless you're catching full sequence... no idea how to hack it.
Petr Medek
LUAmacros author

Post Reply