xkeysnail icon indicating copy to clipboard operation
xkeysnail copied to clipboard

Second Keyboard Configurations with a completely new commands

Open zenny opened this issue 4 years ago • 5 comments

Hi,

Glad that I was redirected to this nifty script from https://emacsredux.com/blog/2016/01/30/remap-return-to-control-in-gnu-slash-linux/#comment-4900549566. Update: https://emacsredux.com/blog/2020/07/05/remap-enter-to-control-in-gnu-linux-2020-edition/ in which a user posted that a newly-introduced bug in xkeysnail v0.3.0 led him to downgrade to v0.2.0 (https://emacsredux.com/blog/2020/07/05/remap-enter-to-control-in-gnu-linux-2020-edition/#comment-4980358080)

However, I would like to know whether this script can remap a second keyboard/device to run certain commands at par with sxhkd or autokey to an entirely new configurations than as described in the key.py?

Say the first keyboard works as a normal keyboard whereas a second input device/kb works to run commnds like elgato deck (https://www.elgato.com/en/gaming/stream-deck or https://youtu.be/GZEoss4XIgc?

Appreciate any inputs.

Cheers, and stay safe, /z

zenny avatar Jun 28 '20 09:06 zenny

Hi Zenny, I'm not expert here, but when you run xkeysnail, you tell it which device to listen to. If you specify just that external device and not your usual keyboard, you should be able to treat that external keyboard as a macro pad and have your original keyboard behavior unchanged. Good luck.

jvasile avatar Sep 02 '20 17:09 jvasile

Currently (as of 0.4) modmaps and multi-modmaps can be conditional based on device name, but keymaps cannot. My new fork expands this to also include keymaps as well. xkeysnail currently supports launch for this kind of thing, although I'm not sure that's optimal and may be removing/deprecating it myself (though it'd be trivial to add back for users who understand the security implications).

Even now (with 0.4) you should be able to:

  • add both devices to xkeysnail with --devices
  • modmap any "conflicting" keys from your Elgato to unused keys in the global keymap (you'd do this conditionally - preventing them from registering as normal keystrokes)
  • then keymap (unconditionally) those unused keys to the launchers you're wishing to configure

joshgoebel avatar Jun 05 '22 18:06 joshgoebel

Currently (as of 0.4) modmaps and multi-modmaps can be conditional based on device name, but keymaps cannot. My new fork expands this to also include keymaps as well. xkeysnail currently supports launch for this kind of thing, although I'm not sure that's optimal and may be removing/deprecating it myself (though it'd be trivial to add back for users who understand the security implications).

Even now (with 0.4) you should be able to:

* add both devices to xkeysnail with `--devices`

* modmap any "conflicting" keys from your Elgato to unused keys in the global keymap (you'd do this conditionally  - preventing them from registering as normal keystrokes)

* then keymap (unconditionally) those unused keys to the launchers you're wishing to configure

@joshgoebel Thanks for your fork and work. I shall try next week and get back to you. Cheers,

zenny avatar Jun 06 '22 15:06 zenny

@zenny It's proving to be a little rough still, next week might be good. :)

joshgoebel avatar Jun 06 '22 23:06 joshgoebel

@zenny Things are much smoother now... I'd recommend running from the latest code in git if you want to try things though, though hopefully in a few days there will be a new 0.6 release.

joshgoebel avatar Jun 20 '22 15:06 joshgoebel