Score:0

Alt key not functioning as expected. How to change Level 3 Shift key back to Alt key?

sm flag

The problem

After a recent automatic update I noticed the Ctrl + Alt + T shortcut was no longer working (gives the special character Ŧ instead). Neither was Alt + Tab when attempting to toggle between applications.

What I believe to be the issue

In the preview image of my keyboard layout I saw that ISO Level3 Shift was showing up where my Alt keys should have been (either side of Space). I am pretty sure this has changed since the update and is causing me the issue.

What I have research/tried

Unchecking ¨Any Alt¨ under ¨Key to choose the 3rd level¨ option in the advanced tab of the keyboard settings:

  • Changed the preview to show Meta/Alt left and right keys in right place but still didn´t fix the problem
  • Also introduced a few other problems

I looked into changing xmodmap settings but found out that this had been replaced by xkb in Ubuntu. Following some more research I tried opening /usr/share/X11/xkb/symbols/gb and tried commenting out the include "level3(ralt_switch)" text in the corresponding sections for my layout type (Macintosh variants). This did work for re-enabling the Alt key functionality but my d key stopped working.....(but still worked on chrome if not in a us english layout).

I´ve now returned those files to the way they were and re-selected "Key to choose the 3rd level" option in the advanced tab of the keyboard settings. My Alt key currently is working as suspected but my d key doesn't work along with other issues.

Running setxkbmap -layout gb gets the d key working again but breaks the Alt key and swaps my " and @ second options. I guess this is because it's changed basic to default english layout and I intend on using the Macintosh option.

If anyone could help me with this issue I'd be very grateful as it's currently driving me insane.

Sadaharu Wakisaka avatar
pl flag
Welcome to AskUbuntu. I am not sure which Ubuntu version and flavor you are in. However, it looks like the system is guessing your keyboard model. `sudo dpkg-reconfigure keyboard-configuration` sets it precisely. I do not want to be impolite to a British man. Please don't get mad at me if this doesn't work. Honour at your service.
Owen Lewis avatar
sm flag
Thanks for your reply. Unfortunately this does not solve my issue. My <kbd>d</kbd> key still doesn't work and I have to run `setxkbmap -layout gb` to get it work which mixes all my keys up in the wrong order for my layout. I'm wondering whether it's because I'm using a Keychron K2 keyboard which doesn't have an option in the selected models list from your suggested code. FYI I'm using Plasma by KDE flavour of Ubuntu.
Sadaharu Wakisaka avatar
pl flag
I am not sure but Keychron K2 is a hybrid apple/windows layout, the reading from article on internet, the windows layout in the K2 is somewhat messy. When `dpkg-reconfigure keybo...` you should select "apple laptop" as well as selector on the left of your keyboard. The fastest way to solve this problem, ask Keychron in HK. One thing I am certain is the Right_Alt key operation in the Ubuntu/Debian is messy especially US layout. When I want to edit something near R_Alt and Modifier swap/restore, I edit `/usr/share/X11/xkb/keycodes/evdev` directly. eg. Make R_CTL key as R_ALT ,`<RALT> = 105`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.