Create a custom setxkbmap option

Viewed 3905

Oddly, this seems like it should be something that's been done before: I want to swap the numbers and symbols on the 10 keys across the top of my keyboard so that:

  • When I hit the 6 key, an * is typed instead of a 6.
  • When I hit Shift+6 the number 6 will display instead of an *.

There were several other modifications that I wanted to make, but quickly found that others had already accomplished these layout modifications before using options for setxkbmap (like caps:swapescape, for example).


Given the above, this is a 3-part question:

  1. Is there an option for swapping numbers and symbols on the top row of my keyboard?
  2. Whether there is or not, is there any way to find out if such a thing exists without having to manually browse the *.lst and *.xml files in /usr/share/X11/xkb/rules/?
  3. Finally, if I were to create an option for setxkbmap, what would be an ideal approach, and how would I see about contributing my option back to the community?

As for question 3:

  • I have attempted to create the option without success (setxkbmap silently fails and I'm not even confident in my approach).
  • I can't find where the project is hosted.
  • Aside from man setxkbmap and various blog posts that touch on the topic, I've been unable to find any documentation on any of this.
1 Answers
Related