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] UK Workman Layout #68

Open
foznoth opened this issue Apr 6, 2021 · 2 comments
Open

[REQUEST] UK Workman Layout #68

foznoth opened this issue Apr 6, 2021 · 2 comments

Comments

@foznoth
Copy link

foznoth commented Apr 6, 2021

Hi,

I'm a bit new to Github & alternate keyboard layouts.
If I can, can I suggest a UK Workman layout?
Same as the US, but with the following changes.
Keycode/normal/with shift/with altgr/with altgr&shift
KC_2/2/"
KC_3/3/£
KC_4/4/$/€
KC_5/5/%/¥
KC_GRV/`/¬/¦
KC_NUHS/#/~

Thanks
Steve

@foznoth
Copy link
Author

foznoth commented Apr 6, 2021

IMG_20210406_131016
The UK QWERTY layout of my tablet.

@jplm824
Copy link

jplm824 commented Aug 5, 2024

Hi, I would also really like to see this properly supported in the main repository. However, after about 3 hours of fiddling (I'm on Linux), I've finally managed to get it working. Basically, what you need is to add the following into your /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.

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

2 participants