navi,
@navi@social.vlhl.dev avatar

oh, i can make my own xkb keymap

and just pick whatever keycode i want for it

that's, really really neat

lanodan,
@lanodan@queer.hacktivis.me avatar

@navi Might need to be a bit careful with X11 (so XWayland in your case) as it only passes keycodes <256, to the doom of the many kinds of multimedia keys.

navi,
@navi@social.vlhl.dev avatar

@lanodan it's gonna be programmatically generated from a config file, so that would happen if the user binds 256+ different keysyms

still, i'll keep that in mind and print out a warning if we get to 256, thanks

lanodan,
@lanodan@queer.hacktivis.me avatar

@navi It's the keycode value, not the amount of different ones.

See // Key codes below cannot be used in X in /usr/share/X11/xkb/keycodes/evdev.

navi,
@navi@social.vlhl.dev avatar

@lanodan yea, but i'll just start at 1 (0?) and count up for each new symbol, heh

so, it'll get to 256 when the config parser finds 256 different symbols

lanodan,
@lanodan@queer.hacktivis.me avatar

@navi I guess that means also allowing to set a keycode in the config as both keysyms and keycodes are used for matches.

navi,
@navi@social.vlhl.dev avatar

@lanodan used for matches?

lanodan,
@lanodan@queer.hacktivis.me avatar

@navi Applications can match against both keysyms and keycodes, keysyms is by far the most popular style but keycodes are still used.

navi,
@navi@social.vlhl.dev avatar

@lanodan on wayland the keyboard interface usually gives you a keymap (no keymap is valid, means the application needs to be able to handle raw evdev keycodes), but every event gives a keycode.

you're supposed to use xkbcommon on the keymap to get a keysym

so here, i'm making my own keymap based on keysyms the user set, makes little sense to let them input keycodes bc most keycodes won't mean anything,

the virtual keyboard doesn't even have an api to give input a key keysyms, only keycodes

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • ngwrru68w68
  • cubers
  • JUstTest
  • ethstaker
  • osvaldo12
  • modclub
  • cisconetworking
  • mdbf
  • tester
  • tacticalgear
  • Leos
  • normalnudes
  • provamag3
  • anitta
  • megavids
  • lostlight
  • All magazines