Keyboard Layout on Ubuntu 22.04

Using Dyalog under 'nixes

Keyboard Layout on Ubuntu 22.04

Postby mhpcto on Tue Jun 21, 2022 4:27 pm

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?
mhpcto
 
Posts: 15
Joined: Tue Sep 18, 2018 5:36 pm

Re: Keyboard Layout on Ubuntu 22.04

Postby Vince|Dyalog on Wed Jun 22, 2022 8:14 am

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
Vince|Dyalog
 
Posts: 373
Joined: Wed Oct 01, 2008 9:39 am

Re: Keyboard Layout on Ubuntu 22.04

Postby mhpcto on Wed Jun 22, 2022 7:26 pm

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.
mhpcto
 
Posts: 15
Joined: Tue Sep 18, 2018 5:36 pm

Re: Keyboard Layout on Ubuntu 22.04

Postby mhpcto on Wed Jun 22, 2022 11:27 pm

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.
mhpcto
 
Posts: 15
Joined: Tue Sep 18, 2018 5:36 pm

Re: Keyboard Layout on Ubuntu 22.04

Postby mhpcto on Thu Jun 23, 2022 5:51 am

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.
mhpcto
 
Posts: 15
Joined: Tue Sep 18, 2018 5:36 pm

Re: Keyboard Layout on Ubuntu 22.04

Postby Vince|Dyalog on Thu Jun 23, 2022 2:26 pm

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
Vince|Dyalog
 
Posts: 373
Joined: Wed Oct 01, 2008 9:39 am

Re: Keyboard Layout on Ubuntu 22.04

Postby mhpcto on Tue Jun 28, 2022 8:56 pm

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.
mhpcto
 
Posts: 15
Joined: Tue Sep 18, 2018 5:36 pm


Return to UNIX and Linux

Who is online

Users browsing this forum: No registered users and 1 guest