kurta999 Posted November 5, 2018 Share Posted November 5, 2018 (edited) I own a K95 keyboard (not platinum, the older one - it has 18 macro keys) and I would like to bind two or three macro to one key, eg G3. (I need this for programming, to bind as many "keywords?" to a key as many I can. If I hit G3 quickly, type: "uint8_t", but If i hold it a bit down eg. 150ms, type: "int8_t") Example: - If I press & release it quickly, play macro 1. - If G3 is pressed more than 100ms, then play macro 2. For those advanced macros would be useful to add support for conditions in macro, like in programming. (IF, ELSE) I'm just asking this question, because if this feature isn't planned in future, I'm going to do it myself with SDK. Thanks! Edited November 5, 2018 by kurta999 Link to comment Share on other sites More sharing options...
hastegag Posted November 5, 2018 Share Posted November 5, 2018 (edited) Do it yourself in cop/c# with sdk or use autohotkey or both. It’s what I do. Now my current setup doesn’t register if a key is held down just when it was last hit but I think that can be done if you poll properly in the sdk register callback example. You can create a context profile to switch to first if you like which I also do effectively doubling or increasing your macro keys especially with modifier keys It’s a job I am sure to get it done on their end and probably not right around the corner giving the other moving parts so I’d try And set it up yourself Edited November 5, 2018 by hastegag Link to comment Share on other sites More sharing options...
dwjp90 Posted November 5, 2018 Share Posted November 5, 2018 Yea, you can do that in the corsair software, kinda. you just need to have it backspace out the old command, and then set the macro to run while held Macro 1 sleep 100ms clear macro 1 macro 2 Link to comment Share on other sites More sharing options...
hastegag Posted November 5, 2018 Share Posted November 5, 2018 (edited) Yea, you can do that in the corsair software, kinda. you just need to have it backspace out the old command, and then set the macro to run while held Macro 1 sleep 100ms clear macro 1 macro 2 can you at your convenience post a working icue example? I'd like to learn how that works and I am not seeing a way to get there. EDIT oh i get it now, you mean to actually backspace out what you typed during a while held macro...interesting idea. I like the context approach personally but that isnt a bad idea! Edited November 5, 2018 by hastegag i get it now Link to comment Share on other sites More sharing options...
dwjp90 Posted November 5, 2018 Share Posted November 5, 2018 I like a real contextual option as well, but that was a good way to handle it Link to comment Share on other sites More sharing options...
hastegag Posted November 6, 2018 Share Posted November 6, 2018 (edited) since we're on the topic in this thread and it at least sounds like OP knows what they are doing and because this is interesting to me, I wanted to add it to my own toolkit. I was hoping to make a proof of concept to clock the keypress and then the keyrelease. From there it is somewhat gravy. I think I have it more or less. Using internet examples from stack and cpp tutorials, using std::chrono and now() to set a start and end time and duration to subtract them. I tried to incorporate that from a fresh CUESDK register_callback.ccp example. It works: http://www.smithany.com/registercallbackwithtime.zip see below, it is waay better and looks like this: http://www.smithany.com/pocfortimingmacrokeys.png I feel like I would be more on the right track if I had a better handle on how to pass things into the lambda, but w/e, I could just make 30 different timers? Probably can lower the fidelity a bit to come off the processor. As is the first time is bad since I couldn't figure out how to pass the startTime into the lambda as part of the context or in the collection. I'll keep playing with it. Edited November 11, 2018 by hastegag directing future viewers Link to comment Share on other sites More sharing options...
kurta999 Posted November 6, 2018 Author Share Posted November 6, 2018 hastegag: Thanks for example project, it looks very interesting! But for me the SDK is the last option, because windows enviroment is unknown for me. I'm working with ARM microprocessors, so it's totally different. dwjp90: LOL! I'm going to try this. Thanks! Link to comment Share on other sites More sharing options...
hastegag Posted November 10, 2018 Share Posted November 10, 2018 (edited) EDIT: Cleaned it up and it is working great for anyone who finds this thread and is interested in timing your Macro Keys. This holds the key down and releases it approximately as you do and then outputs the time. AHK can see this and it corresponds with what the system sees as far as i can tell. The clock stuff could probably be more accurate, but it doesn't seem too demanding on the PC and you're creating conditionals after all so you probably are only going to have something like if (held more than 500 ms) {do y} else {do x}. http://www.smithany.com/register_callback.rar Edited November 11, 2018 by hastegag update Link to comment Share on other sites More sharing options...
hastegag Posted November 16, 2018 Share Posted November 16, 2018 quick followup if anyone needs it or is interested: http://www.smithany.com/timetest.ahk spells out how to react to up events on macro keypresses in autohotkey with the above noted icue SDK project Link to comment Share on other sites More sharing options...
Recommended Posts