Cloudef / wlc

High-level Wayland compositor library
MIT License
331 stars 58 forks source link

[Feature Request] set kbmap per window #226

Open Unip0rn opened 7 years ago

Unip0rn commented 7 years ago

Idea is to make it possible to set kbmap to something different on different windows. Usecase is german writing where you will want to have german layout on maybe everything except where you code. So you get american layout for your editors and german for everything else (or similar) also translators might like it, when translating from russian to english (just an example) where they change the set of letters used.

ljrk0 commented 7 years ago

Sure this is a nice idea, but as you just happened to mention German vs US layout, at least for that use-case there exists the us altgr-intl layout. You have a standard US layout but eg. type 'ü' with "Alt Gr" / "right Alt" + 'y'.

Cloudef commented 7 years ago

Doesn't IMEs already handle this?

gonzote commented 7 years ago

alternate use-case: games that provide no options for configuring keyboard controls could be customized by changing the layout. xkb already provides for a global list of layouts to switch through, but a layout specific to one program would just clutter up the global list.

this will probably be something that would need to wait until #6 is implemented anyway, and might be fairly easy depending on how that's done.

Cloudef commented 7 years ago

Yep solving #6 makes this possible. However IME's should already be able to do switching. Though there is no IME support for wayland native programs implemented yet, don't remember if the protocol for that was even in wayland-protocols.