Comments (9)
Your script looks ok. You haven't describe what doesn't work, what's the behavior. If lmc_send_keys doesn't work, use more flexible function lmc_send_input. Details are described at http://hidmacros.eu/forum/
from luamacros.
i guess luamacros or hidmacros dont support "up" "down" flags like AHK
from luamacros.
"would like to send "+F13" to be sent """""""only"""""""" when "button 86" i
s """"released"""".
Sorry for the initial typo.
The down vote is for closing the issue
Thanks
from luamacros.
I think the solution if there is one; should be at this line.
"if (button == 86//button up flag here//) then
from luamacros.
You have the direction flag even in your code sample and ignores one direction. The flag is there and is supported. All handling is done in callback function, the initial if is useless (if this is your complete code). You still haven't described what's your current behavior - if you have double press, or no press...
I have nothing to add to my comment when closing this issue
from luamacros.
current behaviour is when i press button "86" it sends the keys "+F13"
i dont want it to send "+F13" on press , just ONLY when i stop pressing "button 86" thus lift my finger off.
i am not familiar with "double press" or "no press" concepts.
so is this the part where i dont understand?
"if (button == 86) then --V
lmc_send_keys('+{F13}', 50)"
and there is a direction part:
"if (direction == 1) then return end"
i dont understand what this part does.
My end code, i guess should seem something like this:
(button == 86) then --Maybe this should be (button == 86down)--
lmc_send_keys('+{F12}', 50)"
(button == 86) then --Maybe this should be (button == 86up)--
lmc_send_keys('+{F13}', 50)
from luamacros.
found this:
lmc_set_handler('MACROS',function(button, direction)
if (direction == 1) then return end -- ignore keydown
if (button == 67) then lmc_spawn("cmd") -- Keycode for C
elseif (button == string.byte('C') then lmc_spawn("cmd") -- Via String Byte
else print('Pressed button number ' .. button)
end
end)
so basically my code already just works on key up/ ignoring key down
so that s why you could not understand my aim as my code was already doing the thign i want. But my problem persists as i have to isolate that behaviour or it has to ignore "keydown" for some keys , not whole.
from luamacros.
direction contains 1 for key press and 0 for release. All you need to do is combine conditions (direction and button).
As stated - you can't use luamacros without scripting knowledge.
from luamacros.
can you give me a two-line example where button does work on press and other on release or let me try first, it wont work because i dont know how i add direction.
lmc_set_handler('OBSDeck', function(button,direction)
if (direction == 1) then return end
if (button == 86) then --how do i define press or release on "(button==86)"
lmc_send_keys('+{F13}', 50)
if (button == 86) then
lmc_send_keys('+{F14}', 50)
end
end
)
from luamacros.
Related Issues (20)
- Can't assign { bracket to key HOT 1
- Multimedia keys integration request HOT 1
- New/Virtual Keys HOT 3
- Default keys and programmed keys fire up HOT 4
- LuaMacros not working in different native Windows Applications HOT 1
- Enter issues HOT 1
- Help - trying to get LuaMacros to read my HID device HOT 1
- Add start parameters for .exe to wiki HOT 1
- Recognizing input - Left Ctrl, Right Ctrl
- Pressing other button or same on release HOT 6
- "Such function (to activate window by title) doesn't exist in luamacros."
- special characters
- could checksum be provided to the binary releases? thanks
- EOIeSysError 0007ECD5 HOT 1
- lmc_xpl_command has 50 char limit
- Sending NUMLOCK isn't working HOT 2
- Join voice channel (discord.py) HOT 2
- reaching out to hidmacros HOT 1
- key is captured, but still sent through anyway HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luamacros.