You are not logged in.

#1 2024-03-12 16:30:26

hl037
Member
Registered: 2013-09-04
Posts: 15

How to customize keyboard with wayland ?

Hey there...
So, it's been a while I avoided wayland since the lack of a good solution for re-mapping the keyboard.

Up to this morning, I used setxkbmap with a custom keymap, and I was very happy.

Now, I'm very sad, because the only tools I have found so far like Kmonad, and only maps key events to key events, and has no direct support for utf8...

Example:

I have in my configuration this :

```
    key <KP7>  { [sevensuperior,   KP_7, 0x1002196, 0x10021D6 ] }; // ⁷ 7 ↖ ⇖
    key <KP8>  { [eightsuperior,   KP_8, 0x1002191, 0x10021D1 ] }; // ⁸ 8 ↑ ⇑
    key <KP9>  { [ ninesuperior,   KP_9, 0x1002197, 0x10021D7 ] }; // ⁹ 9 ↗ ⇗

    key <KP4>  { [ foursuperior,   KP_4, 0x1002190, 0x10021D0 ] }; // ⁴ 4 ← ⇐
    key <KP5>  { [ fivesuperior,   KP_5, 0x1002194, 0x10021D4 ] }; // ⁵ 5 ↔ ⇔
    key <KP6>  { [  sixsuperior,   KP_6, 0x1002192, 0x10021D2 ] }; // ⁶ 6 → ⇒

    key <KP1>  { [  onesuperior,   KP_1, 0x1002199, 0x10021D9 ] }; // ¹ 1 ↙ ⇙
    key <KP2>  { [  twosuperior,   KP_2, 0x1002193, 0x10021D3 ] }; // ² 2 ↓ ⇓
    key <KP3>  { [threesuperior,   KP_3, 0x1002198, 0x10021D8 ] }; // ³ 3 ↘ ⇘
   
    key <KP0>  { [ zerosuperior,   KP_0, 0x1002195, 0x10021D5 ] }; // ⁰ 0 ↕ ⇕
```

But Kmonad only support these : https://github.com/kmonad/kmonad/blob/m … poseSeq.hs
and my ↖ ⇖ are not supported >.<

What solutions do I have to overcome this ?

Offline

#2 2024-03-12 17:46:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,459
Website

Re: How to customize keyboard with wayland ?

And what compositor are you using?  The options are completely different depending on the compositor as there is no way at all for "wayland" to do anything at all with a keyboard.

For any wlroots based compositor - and *possibly* others - you can export XKB_DEFAULT_LAYOUT set to your custom layout and that'd be  all you needed.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB