Search found 8 matches

by AnnaV
28 Jan 2019, 13:37
Forum: General
Topic: Keeping button pressed
Replies: 4
Views: 6434

Re: Keeping button pressed

Yeah, I'm betting my left hand on the culprit being Star Citizen. sadface :( I base this on evidence that this code: clear() lmc.minimizeToTray = true lmc.autoReload = true lmc_device_set_name('NUMPAD', '11788717') lmc_minimize() local sc = require 'sc' map = {}; --First Row map[144] = sc.PowerToggl...
by AnnaV
28 Jan 2019, 12:25
Forum: General
Topic: Keeping button pressed
Replies: 4
Views: 6434

Re: Keeping button pressed

Okay, so I'm not completely useless :P I though they were correct. But, for some reason they are not working at all. Any idea if the game in question (Star Citizen) can be incompatible with lmc_send_input()? lmc_send_keys() is working perfectly fine.
by AnnaV
28 Jan 2019, 11:50
Forum: General
Topic: detecting "Double-click" vs "single click" from numpad
Replies: 4
Views: 5767

Re: detecting "Double-click" vs "single click" from numpad

With the lack of timestamp, I'm trying to use os.clock(). Like this: if (button == 45) then button_handler(os.clock()) end; Then my handler has: button_handler = function(time) local t_Delta = time - b_Lastpress local doubleclick = false print('Delta: ' .. t_Delta ..', time: ' .. time .. ', b_Lastpr...
by AnnaV
28 Jan 2019, 11:19
Forum: General
Topic: detecting "Double-click" vs "single click" from numpad
Replies: 4
Views: 5767

Re: detecting "Double-click" vs "single click" from numpad

How do I get the timestamp though? setting the handler like

Code: Select all

function(button, direction, flags, ts) 
doesn't work. How to get the timestamp?
by AnnaV
27 Jan 2019, 22:25
Forum: General
Topic: detecting "Double-click" vs "single click" from numpad
Replies: 4
Views: 5767

detecting "Double-click" vs "single click" from numpad

Hi. I have a cheap USB numpad that has a button for "00". Unfortunately this keypad has been made in such a way that this key isn't unique but just sends the "0" twice. Is there a neat way to detect if a key is pressed quickly twice in succession? (debounce, is essence) I was thinking of setting up ...
by AnnaV
26 Jan 2019, 09:36
Forum: General
Topic: Keeping button pressed
Replies: 4
Views: 6434

Keeping button pressed

Hello I have a game device. I'm trying to map one of it's buttons to keyboard button 'b'. So far, this of course works. However, the game distinguishes between a "click" (just key down and then immediately up) and a "long press" (key down, wait for 500+ms, key up*). lmc_send_keys() cannot of course ...
by AnnaV
19 Jan 2019, 01:05
Forum: Feature requests
Topic: Request: holding key down
Replies: 6
Views: 15686

Re: Request: holding key down

I'd like to second this request. On multiple occasions I'd need to hold down a key, currently only possible to send single keys. (The game I'm playing distinguishes between different functions via single key, or long-press. For example tapping "n" brings down landing gear, but holding down "n" activ...
by AnnaV
17 Jan 2019, 20:45
Forum: HOW-TOs and documentation
Topic: Keystrokes allowed to pass through
Replies: 2
Views: 6305

Re: Keystrokes allowed to pass through

I'm hopping on to this, because this is exactly why I found/have interest in LuaMacros in the first place. I want to use a secondary USB keypad as a separate input (and I can already do that, even the enter key.) But if it allows the "real" keys to pass through, it's of no use, I could just use the ...