How to fix keymap of ISO keyboard - default Debian desktop
#1
Problem Statement

In an x11 terminal if you press Shift-` or Shift-3, or AltGr-4, you do not get the expected characters.

And if you open a console (Ctrl-Alt-F1) and login, and you press Shift-`, or Shift-3, or AltGr-`, or AltGr-4, you again do not get the expected characters.

Disclaimer/Recognition

The solution provided below works on the default Debian desktop that is shipped with the Pinebook Pro. Thanks @Mrfixit2001  and @Luke for your work on crafting this.

Solution

You will need an internet connection to install a package (console-setup) farther down.

Confirm you have the problem by checking the keys as described in the Problem Statement above, this could potentially be fixed in a later version of the default Debian desktop.

Open a terminal in an x11 session (the second icon from the left next to the Menu button) and run the following:

Code:
$ localectl
$ sudo localectl set-keymap uk
$ sudo localectl set-x11-keymap gb pc105
$ localectl
$ systemctl reboot

The localectl command shows you what's currently configured, the last command does what you expect and reboots the machine.

Open a terminal in an x11 session again, and run the following:

Code:
$ sudo dpkg-reconfigure keyboard-configuration

Enter the following when prompted:

Keyboard model:

Generic 105-key (Intl) PC

Keyboard layout:

English (UK)

Key to function as AltGr:

Right Alt (AltGr)

Compose key:

No compose key

Use Control+Alt+Backspace to terminate the X server?

No

Then in the terminal run:

Code:
$ localectl
$ systemctl reboot

After the system reboots and you have logged into an x11 session, open a terminal and run the following:

Code:
$ sudo dpkg-reconfigure locales

When prompted, enter the following:

Locales to be generated:

Select your specific locale, in my case I would select en_US.UTF-8 UTF8. If you are in the UK, it would be en_GB.UTF-8 UTF8

Default locale for the system environment:

Select the same thing you entered in the previous question

Then run in the terminal:

Code:
$ localectl
$ systemctl reboot

After you have logged back into an x11 session, if you open a terminal and check the keys, they should be fully functional in the x11 session.

In a terminal run:

Code:
$ localectl
$ sudo apt install console-setup

This should not require user input, and when finished the console keymap should work fully as the x11 keymap does. A reboot is not required.

Some of the reboots above may not be required, but they don't hurt. The localectl commands peppered throughout may be omited, I just thought it was interesting to watch the changes show up.


Messages In This Thread
How to fix keymap of ISO keyboard - default Debian desktop - by hmuller - 12-17-2019, 07:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Deepin Desktop Installation (Fedora 32 Workstation) Tutorial Upokupo 2 5,188 11-04-2020, 07:19 PM
Last Post: tllim
  Tutorial: Run Debian off NVMe hive 4 6,264 10-19-2020, 10:09 AM
Last Post: hive
  Is there a MMC upgrade instruction from debian-mate to manjaro factory (20.06)? pljanson 4 7,941 06-23-2020, 12:41 AM
Last Post: pljanson

Forum Jump:


Users browsing this thread: 1 Guest(s)