Keyboard input sources

I have used Ubuntu 20.04 with the Gnome desktop until september, where I changed to the Budgie desktop.

I have a Mac extended danish keyboard.

In Gnome I just did select Danish (Macintosh) as input source in the Region & Language settings, and it has worked flawlessly.

Changing to Budgie, the keyboard stopped working as a danish one.

At the moment I have chosen Cameron Multilingual, so I at least have many of the characters like <>*-+?= proper, however, missing the 3 danish characters.

To day I am using Ubuntu Budgie 20.10. It is running as a virtual machine, and the interface is through a remote desktop.

Since I am fan of the Budgie desktop I am looking forward for a solution …

InputSource

You started off talking about 20.04 and then about 20.10. So I’m confused.

Are both not working as you expect?

No problem to install it on 20.04 though, as you can see here :


Beware you have to click on the [ + ] then install, then select it ( or put it first in the list ).

See also Can't change keyboard layout/language and Croatian keyboard layout

After I changed from Gnome to the Budgie desktop in september the keyboard did not work proper anymore.
In late october I upgraded Ubuntu Budgie to release 20.10 and the keyboard is still not working.

I am using the Keyboard Layout switcher in the top dock, so it is easy to change the layout on the fly.
image

Using the layout viewer for the Danish (Macintosh) layout, it is as expected, however, nothing is echoed for Ì, ø, or ü.
InputSource2

Could it be, that something went wrong during the Budgie installation in september?
If so, which modules do I have to reinstall?

Have you read both links suggested in above answer ?

⋅ xkb-data
⋅ xserver-xorg
⋅ x11-xkb-utils

Try reinstalling them using your usual package manager ( synaptic, gnome-package-kit, software… ) or

sudo apt install --reinstall xkb-data xserver-xorg x11-xkb-utils

followed by :

sudo dpkg-reconfigure xkb-data

If no improvement, let’s check if rights and permissions are correct in your personal folder

find ~ -user root
find ~ ! -user $USER

or create a new user/session on your system and see if it works better in that newly added session.

1 Like

Yes, I did read the two links of yours, however, I couldn’t get what it could help me.

Reinstalling the mentioned packages and doing a reconfigure didn’t change anything, even I had a reboot.
My home permissions seems to be right.

Added a new user and switched to that one.

The user was born with my Danish layout, however, not all keys were prober, e.g. <-key was move to the -key, and I couldn't find the character anywhere.

Then I switched back to my original user, and switched to the Danish (Macintosh) layout and voila every key/character do now work.

What had happened during the performance I did, I have absolutely no clue.

On the other I am very happy for the result, and appreciate very much that you took your time to help me. 1000 thanks.

Computer mystery :grin:

If those commands issued nothing

find ~ -user root
find ~ ! -user $USER

…then everything’s fine.
Else they will list files where proprietary is root or is not $USER

There might be a bug as you are not the first user to have problems to switch keyboard mapping.
Any thought @fossfreedom ?

The only switch keyboard issue currently outstanding is showing non-xkb layouts in the applet.

This I fixed during the 20.10 dev cycle and upstreamed it.

I have just done the SRU for 20.04 and should be released hopefully next week.

Try reinstalling them using your usual package manager ( synaptic, gnome-package-kit, software… ) or

sudo apt install --reinstall xkb-data xserver-xorg x11-xkb-utils

followed by :

sudo dpkg-reconfigure xkb-data

Hey thanks @Coeur-Noir, for this ^^ solution. It seemed to fix the # / £ key on my Macintosh UK keyboard model ‘A1242’ when under the layout English (UK, Macintosh).

THANK YOU!!!

BTW there now is a new software update it just popped up. Perhaps a coincidence? And it mentions keyboard layouts. Not sure if it’s connected or relevant to this matter.

Thats a patch I developed to ensure languages such as Japanese and Chinese (non xkb languages) are displayed in the keyboard applet. Some people using such layouts also found that US was stuck as the default layout even if they swapped to GB.

I am on Ubuntu 20.10. Just tried updating my Budgie, no difference. Where can I go to check my Russian keyboard is properly installed. (It was working fine in Ubuntu 20.10 though!)

Have you tried this? Keyboard input sources

@HEBJ and @Steven - hello there!

Hey guys I just realized what the problem actually is going on here. Because it happend to myself too for a while. And again today.

To re-state the problem:

  • You go to “Gnome Settings” app
  • You go to “Input Sources”
  • You add your keyboard layout
  • It is the correct keyboard layout (for your language, letters etc.)
  • You apply and use the Layout
  • HOWEVER the layout does not work, or some letters are in fact dead (missing)
  • Or the layout SOMETIMES does works. But then later on sometimes it does not work
  • You add layouts, you remove layouts and add them back.
  • However it’s still buggy / bugged. Problem re appears again

So what is the problem?

I discovered because it’s happening (yet again). So the problem in fact is:

  • There is a real bug in this software
  • It occurs repeatably, and consistently

How to repeat / reproduce?

  • The bug is missing keys (or ‘dead keys’). You hit the key it does not print anything
  • It always occurs ONLY on the 1st keyboard layout that is TOP of the list
  • If you add multiple keyboards, and re-arrange / drag the list ordering
  • Then the bug will occur when the TOP keyboard is selected

So what is the WORKAROUND ?

  • Add a keyboard you never use as item number #1
  • For example: I added “Greek” keyboard (because I am NOT Greek person)
  • Then I will never want to select this option from the list of Input Methods

All of the 2nd, 3rd, 4th Keyboards all seems to then work OK fine. Whatever you put in the extra multiple entry slots.

@fossfreedom so I guess you know what I am going to say right? Well… there is a real bug here we can verify now. However I do not know where is the software which is created the bug actually exist. Is it the responsibility of Solus, of Ubuntu Budgie, or of Gnome, elsewhere?

Perhaps there is already a bug raised elsewhere (in other project). For the time being I am just very grateful and happy that we have a WORKAROUND. So that we know how to get past this problem here.

However other people will not understand this. Because the bug is non-obvious. It is difficult to know how to avoid the bug. Unless you come here and read this Ticket :wink:

I don’t know where the problem is. This is not an area I use nor any experience with.

I don’t know if this is reproducible in another distros budgie-desktop implementation or if its Debian/Ubuntu specific.

Looking at budgie-desktop itself there is this section in the code-base that deals with Keyboard related stuff - so might be worth adding debug calls in there to figure out what-is-what budgie-desktop/keyboard.vala at c0939ab629c0719370da25ce2b63e7c1aebb92d7 ¡ solus-project/budgie-desktop ¡ GitHub

Ah so funny, because I was so certain to have found this bug. However some days or weeks later it randomly breaks again. And all my hypothesis goes right out the window. Since the next time applying the previous solution (the last method I detailed above previously ^^ up here)… well that didn’t work and hey none of the layouts would. It was just utterly broken.

But then you update packages and have to reboot. So either there was a new package. OR it was simply rebooting the computer and it’s fixed itself randomly again. No idea anymore. My faith is shaken.

HOWEVER today I notice something in my Startup Applications entries. Which I never remember seeing previously. It’s an entry that says im-launch (No description).

I click this to see the command, and is this:

sh -c 'if [ "x$XDG_SESSION_TYPE" = "xwayland" ] ; then exec env IM_CONFIG_CHECK_ENV=1 im-launch true; fi'

ok, but what has this to do with our broken keyboard layouts? Well here see:

θ70° [id:~] $ apt show im-config
Package: im-config
Version: 0.46-1
Priority: optional
Section: x11
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Input Method Team <debian-input-method@lists.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 385 kB
Provides: im-switch
Depends: gettext-base
Recommends: x11-common, zenity | kdialog | kde-baseapps-bin (<< 4:16.08.3-2~) | whiptail
Conflicts: im-switch
Homepage: https://salsa.debian.org/input-method-team/im-config
Task: ubuntu-desktop-minimal, ubuntu-desktop, ubuntu-desktop-raspi, kubuntu-desktop, kubuntu-full, xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop, ubuntu-budgie-desktop-raspi
Download-Size: 27.1 kB
APT-Manual-Installed: yes
APT-Sources: http://gb.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages
Description: Input method configuration framework
 im-config package provides the framework to configure and to switch the
 input method. This input method is the essential mechanism for Japanese,
 Chinese and Korean (CJK) languages to enter their non-ASCII native
 characters.
 .
 Many modern input methods such as IBus support not only one of these CJK
 languages but support almost all languages simultaneously by dynamically
 switching keyboard modes with GUI helper program.
 .
 By installing this package, the most desirable input method and its
 backend conversion engine are automatically configured with both the X
 Window System Input Method (XIM), GTK input method module, Qt input method
 module, and clutter input method module.
 .
 You can further customize your input method with 'im-config' command.

So it does indeed have some connection to keyboard layouts / locales. So maybe it’s to do with this package, or bugs with XORG or Wayland IDK. Just thought it looked connected somehow.

Also because I never remember adding this manually by myself. Or maybe I did? But if that was the case I have no recollection of messing about with this thing. For adding extra multiple keyboards it was with the Settings GUI for Languages / Locales.

With my years-long battle with my danish macintosh keyboard, it seems that I have now fallen over a solution.
My ubuntu 21.04 is using english as language and a danish keyboard.

I did a install of the danish language: sudo apt install language-pack-gnome-da.

Then I changed to the danish language and then back again to english, and my keyboard now works properly.
Even the funny danish letters are made properly.