tolga9009 / sidewinderd

Linux support for Microsoft SideWinder X4 / X6 and Logitech G103 / G105 / G710+.

Home Page:http://cevel.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Map macro keys directly to other keys

P-Sc opened this issue · comments

commented

Would it be viable to map macro keys directly to other keys / scancodes? That is, mapping "key down" and "key up" events directly to another key. This way I could use macro keys as modifier keys.

Duplicate of #46. I will answer the question there.

commented

Thanks for the answer, though that's not exactly what I need.

I would like to have a macro key act as another key, including the time pressed. E.g. if I held down a macro key mapped to CTRL, it shouldn't send a "key up" event for CTRL until I released the macro key. The solution posted in #46 releases the mapped key immediately, even if I'm still pressing the macro key.

I might create a pull request if you give me a hint where to start.

Thanks for the clarification, I indeed misunderstood your question.

I'm not aware of any method to get it working with our current implementation. Haven't worked on the code for a long time, but I think the functions Keyboard::handleKey() (virtual!), Keyboard::playMacro() and VirtualInput::sendEvent() should include everything you need to implement your desired functionality. Before you dive into the code, I recommend you to look into the forks, maybe someone else has done something very similar already! Otherwise, please feel free to fork the project and customize it to your likings!

Cheers,
Tolga

commented

Alright, I'll look into it, as soon as I have time for it.