[PATCH libxkbcommon] Add xkb_key_get_action API

Daniel Stone daniel at fooishbar.org
Mon Apr 2 03:56:59 PDT 2012


Hi,

On 1 April 2012 17:24, Ran Benita <ran234 at gmail.com> wrote:
> On Tue, Mar 27, 2012 at 02:27:49PM +0100, Daniel Stone wrote:
>> This should be fairly straightforward for most LEDs, which only
>> reflect the state of a single locked modifier or group.  For LEDs
>> which reflect multiple states though, which modifiers/groups do you
>> choose, and for LEDs which reflect effective state, which state
>> component do you choose?
>
> I'll admit to only care about locked modifiers, i.e. XkbIM_UseLocked.
> XKB, being XKB, probably allows for some crazy stuff with the poor LEDs;
> I haven't used them, nor do I know how other people use them, so I can't
> comment further.

Indeed.  I think a best-effort with just deriving state from single
locked modifiers is probably the best way to go, and anyone doing more
complex stuff can just deal with it.

>> I guess the alternative is to change xkb_state_update_key to return an
>> int: -1 meaning that the key should not be sent (e.g. due to AccessX
>> slowkeys/debouncing), 0 meaning that the key should be sent and does
>> not repeat, and a positive value specifying the time in milliseconds
>> until the key should repeat.
>>
>> Ideas?
>
> Having the accessibility features built into the library would certainly
> be cool. I did intend to try and write a soft repeat implementation. But
> the evdev one worked well enough. Perhaps I should try now, and
> than I'll have further thoughts about the interface. However at first
> glance it seems like the state solution would be needed for the required
> flexibility.

The more I think about it though, the more I'm leaning towards
removing repeat delay/duration from the library entirely.  Doing that
properly would require passing event times into xkbcommon and
significant complexity for not much gain; I think we could pretty much
support AccessX entirely by having a { SUPPRESS_EVENT,
SEND_EVENT_NO_REPEAT, SEND_EVENT_AND_REPEAT } tristate return from
xkb_state_update_key, plus adding notifications to the state (e.g.
beep on stickykeys).

Cheers,
Daniel


More information about the xorg-devel mailing list