Where best to create/submit new keyboard layout
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Where best to create/submit new keyboard layout
Hi
I'm helping a literacy project in Namibia get some additional tools to make their life easier. We've created a prototype Hunspell spell checker (fortunately they are on Linux Mint & LibreOffice) but we've got a bit of a headache.
Ju|'hoan (ktz) uses four special characters: ǀ ǁ ǃ ǂ (U+01C0 U+01C1 U+01C3 and U+01C2). But since these are on no physical keyboard or even just layout, they tend to use en-GB or en-US as a layout and use / (U+007C) or the pipe character | , double // or ||, the exclamation mark ! (U+0021) and = in place of ǀ ǁ ǃ ǂ and then do a global replace once they're done with the document. This is far from ideal, not only does one end up with the wrong code point for ! and | (whether punctuation or the character is intended) but worst of all, Hunspell in LO treats the pipe character, exclamation mark etc as stop characters, which means that spell checking ends up being a greater mess than help.
We'll be looking into filing a bug with LO but a similar bug is already up there and has been for many years with no action, so that may take a long time. So in the meantime, our thinking was to create a keyboard layout for Ju|'hoan with some combining keystrokes (like AltGr + = > ǂ) so users can enter the correct characters directly, without needing to resort to workarounds and sidestepping the Hunspell in LO problem (with the correct characters for ǀ ǁ ǃ ǂ, there is no problem with the spellchecker.
So our question is, where is the best place for such a bug? LinuxMint or should be be filing with some upstream project? Also, will this require creating a ktz locale at the same time or can a keyboard layout be added independently?
Thanks!
I'm helping a literacy project in Namibia get some additional tools to make their life easier. We've created a prototype Hunspell spell checker (fortunately they are on Linux Mint & LibreOffice) but we've got a bit of a headache.
Ju|'hoan (ktz) uses four special characters: ǀ ǁ ǃ ǂ (U+01C0 U+01C1 U+01C3 and U+01C2). But since these are on no physical keyboard or even just layout, they tend to use en-GB or en-US as a layout and use / (U+007C) or the pipe character | , double // or ||, the exclamation mark ! (U+0021) and = in place of ǀ ǁ ǃ ǂ and then do a global replace once they're done with the document. This is far from ideal, not only does one end up with the wrong code point for ! and | (whether punctuation or the character is intended) but worst of all, Hunspell in LO treats the pipe character, exclamation mark etc as stop characters, which means that spell checking ends up being a greater mess than help.
We'll be looking into filing a bug with LO but a similar bug is already up there and has been for many years with no action, so that may take a long time. So in the meantime, our thinking was to create a keyboard layout for Ju|'hoan with some combining keystrokes (like AltGr + = > ǂ) so users can enter the correct characters directly, without needing to resort to workarounds and sidestepping the Hunspell in LO problem (with the correct characters for ǀ ǁ ǃ ǂ, there is no problem with the spellchecker.
So our question is, where is the best place for such a bug? LinuxMint or should be be filing with some upstream project? Also, will this require creating a ktz locale at the same time or can a keyboard layout be added independently?
Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- Spearmint2
- Level 16
- Posts: 6900
- Joined: Sat May 04, 2013 1:41 pm
- Location: Maryland, USA
Re: Where best to create/submit new keyboard layout
The dconf-editor program if installed will allow change of keyboard layout, if there's one available for that language. Perhaps a change in font package is needful too.
https://wiki.debian.org/Keyboard
Mint already has a Keyboard Configuration program in it where country specific layouts can be set also. Check there first.
https://wiki.debian.org/Keyboard
Mint already has a Keyboard Configuration program in it where country specific layouts can be set also. Check there first.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
Re: Where best to create/submit new keyboard layout
There is nothing available for Ju|'hoan at this stage on any platform, so we have to create one somehow.
Re: Where best to create/submit new keyboard layout
These characters can be inserted into any keyboard layout.
What's your desktop and Linux Mint version?
Which keyboard layout do you want to modify?
Which characters do you want to replace and with what? Keys like Scroll Lock, Home, Insert, etc. can also be adopted for typing new characters if you don't use them.
What's your desktop and Linux Mint version?
Which keyboard layout do you want to modify?
Which characters do you want to replace and with what? Keys like Scroll Lock, Home, Insert, etc. can also be adopted for typing new characters if you don't use them.
Re: Where best to create/submit new keyboard layout
Well, it's good to hear that it's going to be easy
We'd be looking to modify en-GB (which is the current locale they're on, also the hardware keyboards). I'll have to get someone to check Mint Version but I suspect recent. The only thing is that we'd like to do it in a way that makes this accessible to other users too in future, hence the question about where one would commit such a new layout to make sure it gets to others too.
The ideal scenario would be to use the AltGr key i.e.
AltrGr + | » ǀ
AltrGr + / » ǁ
AltGr + ! » ǃ
AltGr + = » ǂ
This way we'd not impact any other keyboard functions and we'd re-use the existing workaround characters as much as possible to make it intuitive.
We'd be looking to modify en-GB (which is the current locale they're on, also the hardware keyboards). I'll have to get someone to check Mint Version but I suspect recent. The only thing is that we'd like to do it in a way that makes this accessible to other users too in future, hence the question about where one would commit such a new layout to make sure it gets to others too.
The ideal scenario would be to use the AltGr key i.e.
AltrGr + | » ǀ
AltrGr + / » ǁ
AltGr + ! » ǃ
AltGr + = » ǂ
This way we'd not impact any other keyboard functions and we'd re-use the existing workaround characters as much as possible to make it intuitive.
Re: Where best to create/submit new keyboard layout
Run this command in terminal and restart the computer:
This command is valid for English(UK) keyboard layout in any version of Linux Mint.
Code: Select all
sudo sed -i \
-e '18s|.*|key<AB10>{[slash,question,U01C1,dead_abovedot]};|' \
-e '20s|.*|key<TLDE>{[grave,notsign,U01C0,bar]};|' \
-e '21s|.*|key<AE01>{[1,exclam,U01C3,exclamdown]};|' \
-e '23s|.*|key<LSGT>{[backslash,bar,U01C0,brokenbar]};|' \
-e '24s|.*|key<AE12>{[equal,plus,U01C2,dead_ogonek]};|' \
/usr/share/X11/xkb/symbols/gb && sudo dpkg-reconfigure xkb-data
Re: Where best to create/submit new keyboard layout
Before I try this, how would I reset this to just the standard en-GB layout? Or does it reset automatically and you have to run this command every time you start the machine?
Re: Where best to create/submit new keyboard layout
Locale is separate from keyboard layout and doesn’t matter in our case.
There isn't keyboard layout called "en-GB", basic GB layout is called "English(UK)".
Go to Keyboard > Layouts and change your layout to English(UK) if it's different.
The command I gave you will remap only English(UK) keyboard layout. You don't need to run it every time you start the machine, the change is persistent but can be reversed.
There isn't keyboard layout called "en-GB", basic GB layout is called "English(UK)".
Go to Keyboard > Layouts and change your layout to English(UK) if it's different.
The command I gave you will remap only English(UK) keyboard layout. You don't need to run it every time you start the machine, the change is persistent but can be reversed.
Re: Where best to create/submit new keyboard layout
Yes, sorry, I know there's no en-GB keyboard, I was just messing with ISO codes all day - and they with my brain!
Ok so I basically re-set this to a "standard" keyboard by selecting it in the settings? Sounds easy enough. I'll give you code a bash when I get my hands on a Mint machine (I'm on Ubuntu at my office, long story).
Ok so I basically re-set this to a "standard" keyboard by selecting it in the settings? Sounds easy enough. I'll give you code a bash when I get my hands on a Mint machine (I'm on Ubuntu at my office, long story).
Re: Where best to create/submit new keyboard layout
Hang on ... I was just wondering why there are 5 lines
Does the above re-set the grave key (the one left of the 1 key)? The | key we had in mind was the |\ key that sits left of the z key on the UK English keyboard.
Code: Select all
-e '20s|.*|key<TLDE>{[grave,notsign,U01C0,bar]};|' \
Re: Where best to create/submit new keyboard layout
When you run this command in terminal and restart the computer, only English(UK) layout will be remapped, even if you use different layout in that moment. So to use new characters you have to switch to English(UK).
The
The
|
key (that sits left of the Z
key) will be remapped as you wanted but because that key sometimes is missing on some keyboards, I additionally remapped the grave key (the one left of the 1
key, which also is sometimes missing by the way). If you don't want that additional key remapped just remove the line you quoted from the command.Re: Where best to create/submit new keyboard layout
Just tried this on my Ubuntu machine, I figured what the heck - and it works great! I had to switch keyboards cause it turns out I was on UK Extended Winkeys but once I added English (UK), boom, there they were!
For now, this will do very nicely for the project. Maybe one day when there are more tech users, we'll look into doing a locale and some localization but for now, this is great so thank you very very much!
For now, this will do very nicely for the project. Maybe one day when there are more tech users, we'll look into doing a locale and some localization but for now, this is great so thank you very very much!
Re: Where best to create/submit new keyboard layout
One last question, is there a reliable list somewhere of these key names, should I need to modify these for some other keys/characters one day?
Re: Where best to create/submit new keyboard layout
A complete list of all available character names can be found in a file
/usr/include/X11/keysymdef.h