Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Officially support British keyboards #83

Open
jplm824 opened this issue Aug 5, 2024 · 0 comments
Open

[REQUEST] Officially support British keyboards #83

jplm824 opened this issue Aug 5, 2024 · 0 comments

Comments

@jplm824
Copy link

jplm824 commented Aug 5, 2024

After about 3 hours of fiddling (I'm on Linux), I've finally managed to get it working. Basically, what I had to do is add the following into my /usr/share/X11/xkb/symbols/gb file (replacing everything, including the whole first block, up to the line partial alphanumeric_keys):

// Keyboard layouts for Great Britain.

default partial alphanumeric_keys
xkb_symbols "basic" {

    // The basic UK layout, also known as the IBM 166 layout,
    // but with the useless brokenbar pushed two levels up.

    // But actually, tweaked to be Workman (see bottom of this definition block):

    include "latin"

    name[Group1]="English (UK, Workman)";

    key <TLDE>	{ [     grave,    notsign,          bar,          bar ]	};
    key <AE02>	{ [         2,   quotedbl,  twosuperior,    oneeighth ]	};
    key <AE03>	{ [         3,   sterling, threesuperior,    sterling ]	};
    key <AE04>	{ [         4,     dollar,     EuroSign,   onequarter ]	};

    key <AC11>	{ [apostrophe,         at, dead_circumflex, dead_caron]	};
    key <BKSL>	{ [numbersign, asciitilde,   dead_grave,   dead_breve ]	};

    key <LSGT>	{ [ backslash,        bar,          bar,    brokenbar ]	};

    include "level3(ralt_switch)"

    // JPLM824: 05/08/2024:
    // Make Workman the default:
    include "us(workman)"
   
};

partial alphanumeric_keys
xkb_symbols "workman" {

    // This variant is explicitly named, to facilitate `setxkbmap gb -variant workman` to correspond to `setxkbmap gb -variant qwerty`.

    include "latin"

    name[Group1]="English (UK, Workman)";

    key <TLDE>	{ [     grave,    notsign,          bar,          bar ]	};
    key <AE02>	{ [         2,   quotedbl,  twosuperior,    oneeighth ]	};
    key <AE03>	{ [         3,   sterling, threesuperior,    sterling ]	};
    key <AE04>	{ [         4,     dollar,     EuroSign,   onequarter ]	};

    key <AC11>	{ [apostrophe,         at, dead_circumflex, dead_caron]	};
    key <BKSL>	{ [numbersign, asciitilde,   dead_grave,   dead_breve ]	};

    key <LSGT>	{ [ backslash,        bar,          bar,    brokenbar ]	};

    include "level3(ralt_switch)"
   
    // JPLM824: 05/08/2024:
    include "us(workman)"
};

partial alphanumeric_keys
xkb_symbols "qwerty" {

    // The basic UK layout, also known as the IBM 166 layout,
    // but with the useless brokenbar pushed two levels up.

    include "latin"

    name[Group1]="English (UK, Qwerty)";

    key <TLDE>	{ [     grave,    notsign,          bar,          bar ]	};
    key <AE02>	{ [         2,   quotedbl,  twosuperior,    oneeighth ]	};
    key <AE03>	{ [         3,   sterling, threesuperior,    sterling ]	};
    key <AE04>	{ [         4,     dollar,     EuroSign,   onequarter ]	};

    key <AC11>	{ [apostrophe,         at, dead_circumflex, dead_caron]	};
    key <BKSL>	{ [numbersign, asciitilde,   dead_grave,   dead_breve ]	};

    key <LSGT>	{ [ backslash,        bar,          bar,    brokenbar ]	};

    include "level3(ralt_switch)"
   
};

This makes UK keyboard workman my default layout, but if I ever have to let someone else type on my machine, all I have to do is toggle back with $ setxkbmap gb -variant qwerty and I can then come back again with either setxkbmap gb -variant workman, or simply, setxkbmap gb`.

What remains missing is to integrate it with the graphical distro installer, and the graphical keyboard layout selectors of the various graphical OS configuration utilities.

I'm also not sure if it could be further streamlined/deduplicated by, for example, recursive includes, or whether that could wreck any of the other variants going on there.

Originally posted by @jplm824 in #68 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant