RedBearAK / toshy

Keymapper config to make Linux work like a 'Tosh!
https://toshy.app
GNU General Public License v3.0
333 stars 16 forks source link

(Question) KDE plasma @ shortcut not working on German layout #193

Open kvonspiczak opened 6 months ago

kvonspiczak commented 6 months ago

Hi I'm using KDE plasma latest version,

this is what the installer gathered: (EV) Toshy installer sees this environment: DISTRO_NAME = 'neon' DISTRO_VER = '22.04' VARIANT_ID = 'notfound' SESSION_TYPE = 'x11' DESKTOP_ENV = 'kde' DE_MAJ_VER = '6'

It all works fine except for the @ shortcut. When I press alt (right of my spacebar and cmd), and press L in for example Kate (texteditor) it types 2d. When I try alt + q it types 153.

I'm using this keyboard: https://www.daskeyboard.com/daskeyboard-4-professional-for-mac/ with a german layout.

kvonspiczak commented 6 months ago

Update: CMD + z in google chrome opens my history instead of reverting my last input.

RedBearAK commented 6 months ago

@kvonspiczak

Keyboard type is defaulting to Windows probably. And you don’t have ibus configured in KDE.

You may also have some difficulties with the German layout, but that’s a separate issue.

Try to force the keyboard type in the tray icon menu. Use “Apple”.

If you can tell me the device name we might be able to fix this permanently for all users. Use the diagnostic shortcut or run toshy-devices in a terminal.

The README describes these different issues. Including how to set a custom entry for the device name to make it get treated as the “Apple” keyboard type.

RedBearAK commented 6 months ago

International ISO level 3 characters may need the preference for the Alt_Gr key to be enabled in the tray icon menu.

kvonspiczak commented 6 months ago

This is the output of toshy-devices:

kvonspiczak@kde:~/Downloads$ toshy-devices

List of devices seen by the keymapper (keyszer): 

keyszer v0.7.1
-------------------------------------------------------------------------------------
Device               Name                                Phys
-------------------------------------------------------------------------------------
/dev/input/event0    Sleep Button                        PNP0C0E/button/input0
/dev/input/event1    Power Button                        PNP0C0C/button/input0
/dev/input/event2    Power Button                        LNXPWRBN/button/input0
/dev/input/event3    Video Bus                           LNXVIDEO/video/input0
/dev/input/event4    USB GAMING MOUSE                    usb-0000:00:14.0-7/input0
/dev/input/event5    USB GAMING MOUSE  Keyboard          usb-0000:00:14.0-7/input1
/dev/input/event6    Conexant Sennheiser Main Audio Consumer Control
                                                         usb-0000:00:14.0-2.2/input5
/dev/input/event7    Conexant Sennheiser Main Audio      usb-0000:00:14.0-2.2/input5
/dev/input/event8    Metadot - Das Keyboard Das Keyboard usb-0000:00:14.0-2.4/input0
/dev/input/event9    Metadot - Das Keyboard Das Keyboard System Control
                                                         usb-0000:00:14.0-2.4/input1
/dev/input/event10   Metadot - Das Keyboard Das Keyboard Consumer Control
                                                         usb-0000:00:14.0-2.4/input1
/dev/input/event11   HDA NVidia HDMI/DP,pcm=3            ALSA
/dev/input/event12   HDA NVidia HDMI/DP,pcm=7            ALSA
/dev/input/event13   HDA NVidia HDMI/DP,pcm=8            ALSA
/dev/input/event14   HDA NVidia HDMI/DP,pcm=9            ALSA
/dev/input/event15   HDA Intel PCH Front Mic             ALSA
/dev/input/event16   HDA Intel PCH Rear Mic              ALSA
/dev/input/event17   HDA Intel PCH Line                  ALSA
/dev/input/event18   HDA Intel PCH Line Out Front        ALSA
/dev/input/event19   HDA Intel PCH Line Out Surround     ALSA
/dev/input/event20   HDA Intel PCH Line Out CLFE         ALSA
/dev/input/event21   HDA Intel PCH Line Out Side         ALSA
/dev/input/event22   HDA Intel PCH Front Headphone       ALSA
/dev/input/event23   HDA Intel PCH HDMI/DP,pcm=3         ALSA
/dev/input/event24   HDA Intel PCH HDMI/DP,pcm=7         ALSA
/dev/input/event25   HDA Intel PCH HDMI/DP,pcm=8         ALSA
/dev/input/event26   Keyszer (virtual) Keyboard          py-evdev-uinput
RedBearAK commented 6 months ago

“Metadot - Das Keyboard Das Keyboard”

That’s the device name to add to the custom dictionary entry described in the FAQ about keyboard types.

If that is guaranteed to be an Apple layout keyboard, I can also add it to the default config file.

kvonspiczak commented 6 months ago

Hmm I only own the mac edition and not the windows one, so I can't tell for sure, how the windows one would identify itself, when connecting it.

RedBearAK commented 6 months ago

Hmm I only own the mac edition and not the windows one, so I can't tell for sure, how the windows one would identify itself, when connecting it.

That’s a potential problem. But you can fix it for yourself with the custom entry in the config file.

This issue thread describes in detail the problem with the non-US layout. Which you may or may not find to be a big deal. Depends on what shortcuts you tend to use.

https://github.com/RedBearAK/toshy/issues/79

kvonspiczak commented 6 months ago

Thank you I will try this!

kvonspiczak commented 6 months ago

One more question: do the system keyboard settings affect toshy at all? For instance in KDE I can configure the keyboard type to be apple, or generic or anything basically. Does that affect how toshy works? It seems like in PHPStorm most of the shortcuts produce some characters that are typed but do not result in the actual shortcut i pressed, e.g. CMD + C / CMD + V, CMD + Z, it all results in random numbers (probably the key code)? But in Kate or chrome more shortcuts seem to be working.

edit: seems like it needed a little bit to apply the changes. Now it works fine in PHPStorm :D I added my keyboard identifier to the config as you recommended, then enabled the auto detection again, also disabled OptSpecLayout and enabled ALT_GR on Right CMD.

I'll update the thread, if i run into more issues. For now it seems fine. Thanks for making this!

RedBearAK commented 6 months ago

One more question: do the system keyboard settings affect toshy at all? For instance in KDE I can configure the keyboard type to be apple, or generic or anything basically. Does that affect how toshy works?

Yes, normally best to stick with the default way the keyboard was identified. Changing it to a different physical type in the DE settings outside of Toshy can make the modifier remaps not make sense. But using a “Macintosh” variant of the logical layout can give you access to the special characters you usually find on Apple keyboards in macOS. Though unlike the OptSpecLayout internal to the Toshy config file, those special characters are only accessible with the Alt_Gr key on the right side.

The situation can be a bit complicated. 😑