3

What I'm trying to do is to pre-configure a Logitech G602 assigning a specific key combination to each configurable button (G6, G7, G7 etc...) The only way to do that is on Windows (to save the key combinations on the internal memory). But if I set for example Control + Super + 6 to the G6 button and Control + Super + 7 to the G7 button an so on, I can forget about Windows and set binds to every key combination (Control + Super + 6 ...) using Xbindkeys. I have done that with mouses with extra buttons using for example:

#Copy
"xdotool key ctrl+C"
   b:8

That assigns the copy function to b:8 mouse button. The thing is that this mouse does not work in the same way that other mice do. It is like a keyboard in which I can define the function for every button but in the internal memory. This is what I want to do (as an example) but it is not working:

#Copy
"xdotool key ctrl+C"
   Control + Super + 6

This configuration did not work neither:

#Copy
"xvkbd -xsendevent -text "Cc""
   Control + Super + 6

What I want to do is to basically use a keyboard shortcut to trigger another keyboard shortcut. That way, I can ask for a PC with Windows and do a one-time configuration to the mouse and the assign functions as I want on Linux.

Thank you!

  • Have you used xbindkeys --key to see what kind of events those buttons send by default? I don't know if this is the case with your mouse, but I'll note that my Razer keyboard requires an initialization command to be sent before its extra keys report any scancodes at all – Fox Dec 23 '17 at 2:24
  • Yes, it detects the key combinations as if I'm typing on the keyboard. The problem is that I can't even bind the keyboard shortcuts using the keyboard it self. Foe example I can't use Control + Super + 6 to execute Control + C Thanks. – eera5607 Dec 23 '17 at 17:30
  • I have also tried with this script on AutoKey assigning it to a key shortcut like Control + Super + 6 output = system.exec_command("xdotool key ctrl+c") keyboard.send_keys(output) and it did not work. – eera5607 Dec 23 '17 at 17:35
  • I use xdotool getactivewindow key --clearmodifiers ctrl+c. Otherwise, you're going to be pressing Control and c in addition to the already-pressed Control and Super — Control+Super+c. Some applications ignore this. In that case, remove getactivewindow – Fox Dec 23 '17 at 17:40
  • Thank you! I can't find a way to make it work with Xbindkeys but the I think the problem is with the way Xbindkeys detects the key combinations. The command that you shared is ok and I can easily assign it to a custom shortcut on Keyboard settings on a regular Ubuntu installation and it works just find. I think that the way the key combinations are being detected by xbindkeys -mk are causing the issues. Thanks! – eera5607 Dec 23 '17 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.