Doesn't block keys in notepad++

Report any bugs or suspicious behaviour here
Post Reply
base64
Posts: 2
Joined: 23 Apr 2018, 09:50

Doesn't block keys in notepad++

Post by base64 » 23 Apr 2018, 10:49

Hi,

I've just discovered Luamacros a few days ago. It is awesome. Thank you for your work.

I am having a problem that original keystrokes are still being sent to notepad++

For example, the code below blocks all keys, except in notepad++, where the keys are still being sent.

Code: Select all

lmc_assign_keyboard('MACRO')
lmc_set_handler('MACRO', function(button, direction)
end) 
And another example, running the code below and when numpad1 is pressed it prints "xyz" in other programs. Except in notepad++, it prints "1xyz"

Code: Select all

lmc_assign_keyboard('MACRO')
lmc_set_handler('MACRO', function(button, direction)
if (direction == 0) then return
elseif (button == 97) then lmc_send_keys('xyz') end
end) 
Is it possible to also block keystrokes in notepad++?

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

Re: Doesn't block keys in notepad++

Post by admin » 24 Apr 2018, 08:33

Hmm, hard to say fix something that works for me :-/.
Aren't you running Notepad++ as admin and luamacros as regular user?
Petr Medek
LUAmacros author

base64
Posts: 2
Joined: 23 Apr 2018, 09:50

Re: Doesn't block keys in notepad++

Post by base64 » 24 Apr 2018, 09:13

I was running luamacros as admin and notepad++ regular.

Actually, running luamacros without admin rights fixed it for me. :shock:

Thanks for your help.

plc
Posts: 1
Joined: 08 Jun 2018, 10:17

Re: Doesn't block keys in notepad++

Post by plc » 08 Jun 2018, 10:21

Hi

I have a similar issue. I'm using the quick start sample and when typing "h" I get hHello World

the 'h' is still send to word/terminal/anything. Tested it in normal and admin mode

I'm running LUAMacros on a Windows 7 host

What am I missing ?

Thx

bungie
Posts: 1
Joined: 23 Aug 2018, 12:40

Re: Doesn't block keys in notepad++

Post by bungie » 23 Aug 2018, 12:41

I've got the same issue. Any fix?
I'm kinda a guy who wants to know every thing about grand national club history. Right now my mother is obsessed with this info. Good for her!

Maggie
Posts: 1
Joined: 17 Jan 2021, 06:36

Re: Doesn't block keys in notepad++

Post by Maggie » 17 Jan 2021, 06:39

hi guys,
i see the problem,
the button command works only DURING RELEASE . So when you press it records the original key letter and then when you release it gives you the modified letter that you want.

i tried with
function press(key)
lmc_send_input(string.byte(key), 0, 0) -- press
lmc_send_input(string.byte(key), 0, 2) -- release
end

how to use this any suggestion ?

Post Reply