[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Thoughts on an xinput extension?
From: |
Jason Miller |
Subject: |
Re: Thoughts on an xinput extension? |
Date: |
Tue, 2 Jun 2020 17:42:24 -0700 |
On Tue, 2 Jun 2020 17:41:45 -0700, Jason Miller <jason@milr.com> wrote:
> I was frustrated by the fact that since the pointer-grab is global, you can't
> inject pointer events with e.g. xdotool from button maps.
>
> I hacked-up a demo that allows grabbing via xinput, which only grabs a
> specific
> device which means pointer events can still be sent to the window.
>
> My current syntax is only tested in the guile format; it allows specifying an
> xinput device by name as a modifier and looks like:
>
> ("d:ELECOM ELECOM TrackBall Mouse" "b:9")
>
> Which will map to button 9 of the first xinput device named "d:ELECOM ELECOM
> TrackBall Mouse"
>
> Is this something that interests anyone? If so I can make a more polished
> patch.
>
> Still TBD:
>
> 1. I haven't looked at the non-guile parser at all; would introducing spaces
> in
> modifier names cause a grammar ambiguity? If not we would need a way of
> quoting xinput device names, since spaces are relatively common.
>
> 2. Should this be just for pointers? As implemented it currently pointer-only
> as I haven't had any issues with injecting keystrokes from keygrabs. Maybe in
> corner-cases from chording it can happen? Anyone run into keyboard issues
> with
> grabs affecting your ability to send keystrokes? If we do allow keyboards as
> well, then the syntax will need tweaking as many programmable mice may
> register
> both a pointer and a keyboard with the same name.
> (maybe p:<devname> and k:<devname> ?)
>
> -Jason