Keyboard Layout on Ubuntu 22.04
11 posts
• Page 1 of 2 • 1, 2
Keyboard Layout on Ubuntu 22.04
I just brought up a new laptop with a clean install of Ubuntu 22.04.
Installed Dyalog from the deb file via apt. Slightly off topic: trying to start dyalog after the install resulted in a 'libtinfo5 not found' error. Once that was installed, dyalog starts fine on console or ride.
I have been unable to add the Dyalog APL keyboard layout to enter APL keys.
The APL fonts are installed and working. It also looks like the APL keymap is installed in /usr/share/X11/xkb/symbols.
The APL keyboard option is not listed in Settings->Keyboard->Input Source, so I can't add it via that interface.
Adding the apl/dyalog keyboard directly via setxkbmap also has no effect, the APL keyboard layout doe not show when using the WIN+SPACE shortcut. I added a couple of keyboard maps via Settings->Keyboard->Inpout Sources and they show with WIN+SPACE and can be selected.
Does anyone know what additional step is needed to make Ubuntu 22.04 recognize the APL keymap?
Installed Dyalog from the deb file via apt. Slightly off topic: trying to start dyalog after the install resulted in a 'libtinfo5 not found' error. Once that was installed, dyalog starts fine on console or ride.
I have been unable to add the Dyalog APL keyboard layout to enter APL keys.
The APL fonts are installed and working. It also looks like the APL keymap is installed in /usr/share/X11/xkb/symbols.
The APL keyboard option is not listed in Settings->Keyboard->Input Source, so I can't add it via that interface.
Adding the apl/dyalog keyboard directly via setxkbmap also has no effect, the APL keyboard layout doe not show when using the WIN+SPACE shortcut. I added a couple of keyboard maps via Settings->Keyboard->Inpout Sources and they show with WIN+SPACE and can be selected.
Does anyone know what additional step is needed to make Ubuntu 22.04 recognize the APL keymap?
- mhpcto
- Posts: 18
- Joined: Tue Sep 18, 2018 5:36 pm
Re: Keyboard Layout on Ubuntu 22.04
Hi mhpcto,
There is a page on the aplwiki which explains how to type APL Glyphs on Linux here.
https://aplwiki.com/wiki/Typing_glyphs_on_Linux
This is how to install a APL Keyboard layout on Ubuntu 22.04:
For default GNOME, (not GNOME on Xorg)
0) I think that it uses Wayland. You can confirm that by typing this in a shell.
echo $XDG_SESSION_TYPE
1) sudo apt install gnome-tweaks
2) Start gnome-tweaks
a) Under Keyboard & Mouse
Turn on "Show Extended Input Sources"
b) Press the Additional Layout options
> Switching to another layout
Choose a key for this. I choose Left Alt (while pressed)
3) In Ubuntu settings
Keyboard
Under Input Sources
Press the + button
Press the English US button if that is your native language
Choose APL Symbols (Dyalog APL)
4) Log out and log in again.
5) Start dyalog. As I chose Left Alt, try Left Alt and i to get ⍳, Left Alt and a to get ⍺, etc.
Hope that helps, and let me know if you have any questions.
Regards,
Vince
There is a page on the aplwiki which explains how to type APL Glyphs on Linux here.
https://aplwiki.com/wiki/Typing_glyphs_on_Linux
This is how to install a APL Keyboard layout on Ubuntu 22.04:
For default GNOME, (not GNOME on Xorg)
0) I think that it uses Wayland. You can confirm that by typing this in a shell.
echo $XDG_SESSION_TYPE
1) sudo apt install gnome-tweaks
2) Start gnome-tweaks
a) Under Keyboard & Mouse
Turn on "Show Extended Input Sources"
b) Press the Additional Layout options
> Switching to another layout
Choose a key for this. I choose Left Alt (while pressed)
3) In Ubuntu settings
Keyboard
Under Input Sources
Press the + button
Press the English US button if that is your native language
Choose APL Symbols (Dyalog APL)
4) Log out and log in again.
5) Start dyalog. As I chose Left Alt, try Left Alt and i to get ⍳, Left Alt and a to get ⍺, etc.
Hope that helps, and let me know if you have any questions.
Regards,
Vince
- Vince|Dyalog
- Posts: 444
- Joined: Wed Oct 01, 2008 9:39 am
Re: Keyboard Layout on Ubuntu 22.04
Thank you for the info and the instructions.
That's a leap forward in that the APL glyphs are rendered but, once I select the Dyalog layout, I get only APL characters. No ASCII nor do editing keys like BACKSPACE work anymore.
Let me clarify:
If I set Left-ALT and Right-ALT (both while pressed) I do not get APL characters. I had additional keyboard layouts and even after removing all of them and only English(US) and Dyalog the switching while holding one of the ALT keys has no effect.
In prior version, and under Windows, I would normally switch the input layout with WIN-SPACE to the Dyalog APL layout which is a unified keyboard that uses ALT by default. This does not seem to work as selecting the Dyalog layout renders only APL even without a modifier key (ALT).
One additional detail:
I didn't exactly follow your instructions for adding the Dyalog APL layout via the Settings. Because the "English (US)" layout is the default, first entry in "Input Sources" it can't be selected when pressing "+" to add another layout. Instead I selected "English (United States)" and then "APL Symbols (Dyalog APL)" to install APL as a second layout.
That's a leap forward in that the APL glyphs are rendered but, once I select the Dyalog layout, I get only APL characters. No ASCII nor do editing keys like BACKSPACE work anymore.
Let me clarify:
If I set Left-ALT and Right-ALT (both while pressed) I do not get APL characters. I had additional keyboard layouts and even after removing all of them and only English(US) and Dyalog the switching while holding one of the ALT keys has no effect.
In prior version, and under Windows, I would normally switch the input layout with WIN-SPACE to the Dyalog APL layout which is a unified keyboard that uses ALT by default. This does not seem to work as selecting the Dyalog layout renders only APL even without a modifier key (ALT).
One additional detail:
I didn't exactly follow your instructions for adding the Dyalog APL layout via the Settings. Because the "English (US)" layout is the default, first entry in "Input Sources" it can't be selected when pressing "+" to add another layout. Instead I selected "English (United States)" and then "APL Symbols (Dyalog APL)" to install APL as a second layout.
- mhpcto
- Posts: 18
- Joined: Tue Sep 18, 2018 5:36 pm
Re: Keyboard Layout on Ubuntu 22.04
Fixed.
Turns out that I needed to uncheck the two (default?) selections under "Key to choose 3rd level", namely "Left Alt" and "Right Alt never chooses 3rd level" to make it work.
Turns out that I needed to uncheck the two (default?) selections under "Key to choose 3rd level", namely "Left Alt" and "Right Alt never chooses 3rd level" to make it work.
- mhpcto
- Posts: 18
- Joined: Tue Sep 18, 2018 5:36 pm
Re: Keyboard Layout on Ubuntu 22.04
This setup does not work with Ride 4.x
Looking through the Ride documentation is seems that Ride requires a Prefix key and does not allow a modifier key like ALT.
Looking through the Ride documentation is seems that Ride requires a Prefix key and does not allow a modifier key like ALT.
- mhpcto
- Posts: 18
- Joined: Tue Sep 18, 2018 5:36 pm
Re: Keyboard Layout on Ubuntu 22.04
Hi mhpcto,
RIDE does not require the usage of the prefix keyboard. It provides that as an alternative way to type APL.
I can reproduce the behaviour where RIDE 4.4 does not generate APL characters when using the alt key as I set up previously in this thread.
This is under Wayland. I have logged an issue for this in the RIDE GitHub area. https://github.com/Dyalog/ride/issues/879
I can use the alt key if I log out and switch to GNOME on Xorg after pressing the round cogwheel settings button on the log in screen.
Would you like to try that, or do you have a requirement to run on Wayland?
Regards,
Vince
RIDE does not require the usage of the prefix keyboard. It provides that as an alternative way to type APL.
I can reproduce the behaviour where RIDE 4.4 does not generate APL characters when using the alt key as I set up previously in this thread.
This is under Wayland. I have logged an issue for this in the RIDE GitHub area. https://github.com/Dyalog/ride/issues/879
I can use the alt key if I log out and switch to GNOME on Xorg after pressing the round cogwheel settings button on the log in screen.
Would you like to try that, or do you have a requirement to run on Wayland?
Regards,
Vince
- Vince|Dyalog
- Posts: 444
- Joined: Wed Oct 01, 2008 9:39 am
Re: Keyboard Layout on Ubuntu 22.04
As you say, switching to Xorg enables the ALT modified key in both Ride 4.4 and 4.5.
Unfortunately, I see a weird side effect that, after the laptop goes through a sleep/wake cycle, mouse clicks are "funky":
Mouse moves and hovering over controls shows tool tips (if supported). Clicking the main pad has no effect. Using the physical button right button on the mouse sometimes acts like the right button on the active app (i.e. shows a right click menu), but may sometimes act like the main button once. Switching back to Wayland resolves that issue.
The ALT key modifier works with everything else but Ride.
Unfortunately, I see a weird side effect that, after the laptop goes through a sleep/wake cycle, mouse clicks are "funky":
Mouse moves and hovering over controls shows tool tips (if supported). Clicking the main pad has no effect. Using the physical button right button on the mouse sometimes acts like the right button on the active app (i.e. shows a right click menu), but may sometimes act like the main button once. Switching back to Wayland resolves that issue.
The ALT key modifier works with everything else but Ride.
- mhpcto
- Posts: 18
- Joined: Tue Sep 18, 2018 5:36 pm
Re: Keyboard Layout on Ubuntu 22.04
I just discovered another odd, modifier key issue that I think is general in nature, but I hope someone here has an idea on how to fix it.
The environment is still Ubuntu 22.04.
I have a number of terminal emulators. After adding Dyalog APL symbols as a second input source and enabling Left ALT as the compose key the default terminal and kitty will properly handle ALT key combinations and render APL characters. If I run vim in them, I get APL characters.
I recently installed cool-retro-term and in that emulation, ALT key combinations ignore the modifier key and thus don't render APL characters. That's a bummer because I wanted to recreate the look of the IBM 5100, the first APL machine I worked on, using cool-retro-term which is a truly superb emulation of old CRT screens.
Would anyone know what specific keyboard layout and ALT processing an application has to do to support alternate font activated by the modifier key? I started digging into this a bit but it's badly documented complexity.
The environment is still Ubuntu 22.04.
I have a number of terminal emulators. After adding Dyalog APL symbols as a second input source and enabling Left ALT as the compose key the default terminal and kitty will properly handle ALT key combinations and render APL characters. If I run vim in them, I get APL characters.
I recently installed cool-retro-term and in that emulation, ALT key combinations ignore the modifier key and thus don't render APL characters. That's a bummer because I wanted to recreate the look of the IBM 5100, the first APL machine I worked on, using cool-retro-term which is a truly superb emulation of old CRT screens.
Would anyone know what specific keyboard layout and ALT processing an application has to do to support alternate font activated by the modifier key? I started digging into this a bit but it's badly documented complexity.
- mhpcto
- Posts: 18
- Joined: Tue Sep 18, 2018 5:36 pm
Re: Keyboard Layout on Ubuntu 22.04
Have you tried with modifiers other than Left ALT? Is ALT used to access the menus in cool-retro-term? It sounds like the application is consuming the ALT before the input method can use it. I'm working on an XCompose based solution which might work as an alternative. In any case, we will update here when there is news.
- RichardP|Dyalog
- Posts: 35
- Joined: Fri Oct 12, 2018 3:05 pm
Re: Keyboard Layout on Ubuntu 22.04
I was thinking along those lines and went through the source code to see if cool-retro-term did anything fancy with modifier keys. It all seemed standard X11.
Just as a quick test, I booted Ubuntu 22.04, which I normally run in Wayland, into X11 mode and, voila, it works. It appears that the default terminal as well as kitty are somewhat Wayland aware, while cool-retro-term is not and that seems to be the key issue.
Just as a quick test, I booted Ubuntu 22.04, which I normally run in Wayland, into X11 mode and, voila, it works. It appears that the default terminal as well as kitty are somewhat Wayland aware, while cool-retro-term is not and that seems to be the key issue.
Last edited by mhpcto on Wed Oct 26, 2022 3:19 pm, edited 1 time in total.
- mhpcto
- Posts: 18
- Joined: Tue Sep 18, 2018 5:36 pm
11 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group