add a layout to keyboardsetup

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

add a layout to keyboardsetup

Post by mimosa »

I use the "programmer Dvorak" layout, which can be set like this:

Code: Select all

setxkbmap us -variant dvp
Normally I select a more generic Dvorak during installation (which is still there in Console) and change the x keyboard in .xinitrc. But it would be better to change it system-wide and independent of the window manager.

To add it to keyboardsetup, perhaps I need to add an entry like this to the 'keymaps' file?

Code: Select all

programmer_dvorak|us|dvp|
That isn't enough on its own, though.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: add a layout to keyboardsetup

Post by gapan »

I'm afraid keyboardsetup does not currently support having the same layout with a different variant as different option.

Without having tried it, I'm guessing a workaround would be:

Code: Select all

sudo cp /usr/share/kbd/keymaps/i386/qwerty/us.map.gz /usr/share/kbd/keymaps/i386/qwerty/us-dvp.map.gz
and then add an entry

Code: Select all

us-dvp|us|dvp|
in the /usr/share/salixtools/keymaps file.

Can you try it?
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: add a layout to keyboardsetup

Post by mimosa »

That gives me the correct layout in X, but qwerty in console.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: add a layout to keyboardsetup

Post by gapan »

What is the one you want on the console?
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: add a layout to keyboardsetup

Post by mimosa »

The same one everywhere - programmer Dvorak (which is what I can touch type).
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: add a layout to keyboardsetup

Post by gapan »

If you choose one of the dvorak options that are already available in keyboardsetup, do you get the keymap you want in the console?
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: add a layout to keyboardsetup

Post by mimosa »

No, but then I don't get it in X either - the difference between dvp and normal Dvorak is the symbol characters are in completely different places, and numbers are accessed by shift, on the grounds they are less often used especially in code. So I can muddle through but it may take me a while to find things like /.

This is obviously being perfectionist but it would be pleasing to have perfection ;)
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: add a layout to keyboardsetup

Post by gapan »

Well then, you'll have to do some work! :D I don't think there exists a dvorak programmer's keymap for the console so you'll have to make one yourself.

1. take an existing keymap that is closest to the one you want (I guess /usr/share/kbd/keymaps/i386/dvorak/dvorak.map.gz or /usr/share/kbd/keymaps/i386/qwerty/us.map.gz ? ).
2. gunzip it, it's just a text file
3. edit it with your text editor to your liking.
4. gzip it and copy it somewhere in /usr/share/kbd/keymaps/i386/, e.g: /usr/share/kbd/keymaps/i386/dvorak/dvorak-programmer.map.gz
5. change the entry to the /usr/share/salixtools/keymaps file to

Code: Select all

dvorak-programmer|us|dvp|
(or whatever you've named it)
6. profit?
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: add a layout to keyboardsetup

Post by mimosa »

Thanks George, I'll let you know how the project goes! I could even treat it as a warmup for my own customisation of dvp to make it easier to use exotica such as umlauts, and thorn and eth.

But maybe I'll just stick to my time-honoured workaround :mrgreen:

One thing I will say though, since I finally learned to touch type five or ten years ago, I have only regretted my lack of discipline in the preceding decades.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: add a layout to keyboardsetup

Post by gapan »

Send it to me when you're done so there's a dvorak/mimosa option during installation! 8-)
Image
Image
Post Reply