Closed Fariusz closed 1 month ago
@Fariusz
The situation around getting the special characters is a bit complicated on Linux, particularly while using a keymapper.
I advise keeping universal Mac/Windows keyboards in the Windows mode, otherwise you have to do something in the config file to specify that the device is an "Apple" keyboard type in order to get the virtualized Command key to be on the key next to the Space bar, where it should be to mimic a real Apple keyboard.
In the Windows mode, and with the Alt_Gr on Right Cmd
option enabled, the ISO level 3 shift key should be the right-side Alt key, next to the Space bar. With that option enabled, the right side keys aren't modmapped to mimic an Apple keyboard, in order to not interfere with getting to the special characters.
Linux generally only provides for the one key on the right side to get to the ISO level 3 characters, and of course that can be combined with the regular Shift key to get to the fourth character.
Toshy's config has two optional special character layouts, but they are both US layouts, and to make them work you have to either be in GNOME or have ibus
enabled. I have that disabled by default because it's just not that useful for most international users. But if it were enabled and you were using a US layout, I think all those characters are somewhere on the "ABC Extended" layout option, and the special characters would be accessible with either of the virtualized Option key physical positions. Instead of just being on the layout like with the Polish keyboard, I think they would be part of "dead key" groups.
I recommend sticking with the Linux way of getting to those characters, and just getting used to using the right Alt_Gr key next to the Space bar for that purpose. When I preview the Polish layout, I see the "a" and "e" with ogonek diacritic on the "a" and "e" keys, so I'm not sure why you would not be able to get those characters to come out of the keyboard.
You are using the Polish layout? Be aware that international layouts will often need to make some modifications to the keyboard definition file in order to fix a few keyboard shortcuts, but that should have no bearing on just getting those particular ISO level 3 characters.
I'm confused by the "ctrl" in this, since Option/Alt and Ctrl are different keys on Apple keyboards:
On mac it is done by default on right options (ctrl)
Does the Alt_Gr (right Alt) key allow you to get to those two characters with ogonek? I don't really know why changing the ISO level 3 Shift key to the Meta/Super/Win key would make any difference. Check how things work while you have Toshy disabled. (Use the tray icon menu to stop the Toshy services.)
Actually, the Polish layout seems remarkably similar to the US layout, with QWERTY, brackets in the same places, and no inverted number keys row like French AZERTY. Maybe you won't really need to make any adjustments to the key definition file to fix shortcuts.
But that's a separate issue from figuring out why you can't get those characters.
In the Windows mode, and with the Alt_Gr on Right Cmd option enabled, the ISO level 3 shift key should be the right-side Alt key, next to the Space bar.
Yes, it is and that works like charm. But on a mac polish letters are done with the second key (option) on the right of spacebar.
I'm confused by the "ctrl" in this, since Option/Alt and Ctrl are different keys on Apple keyboards: On Logitech MX Keys second key on the right of spacebar is options (ctrl)
Photo for reference
Does the Alt_Gr (right Alt) key allow you to get to those two characters with ogonek? I don't really know why changing the ISO level 3 Shift key to the Meta/Super/Win key would make any difference. Check how things work while you have Toshy disabled. (Use the tray icon menu to stop the Toshy services.)
Yes right Alt is doing it job out of the box with Toshy disabled.
@Fariusz
On Logitech MX Keys second key on the right of spacebar is options (ctrl)
Oh, right, because it's both a compact and a "universal" keyboard with different layouts. This frequently happens on PC laptop keyboards. But the key is not literally both Option/Alt and Ctrl at the same time. That's what had me confused. They made it a Ctrl key on the right instead of another Meta/Super/"Windows" key. (Or "Start", as they call it on the other side of the Space bar.)
But on a mac polish letters are done with the second key (option) on the right of spacebar.
Yes, And usually on Mac the Option keys on both sides are usable for what I call the "Option-key special characters". I attempted to simulate this with my implementation of such a scheme in the Toshy default config file. But like I said, there are many unfortunate caveats to using my implementation. The need for ibus
(for the Shift+Ctrl+U
shortcut to invoke Unicode character entry), and the fact that I could only implement the "US" and "ABC Extended" (still US) layouts for those special characters. So that whole thing is really only usable in very limited circumstances, which is why it is disabled by default in the tray icon menu. You can try it, but the special characters would be completely different from the Polish layout. They are documented at the link earlier in the paragraph.
The reality is, before I did that complicated implementation of the way macOS does the special characters with the Option keys (and Shift+Option), the only way to get to characters like that in Linux was to use the Linux method. I found out later that there are actually "Macintosh" keyboard layout variants for a lot of languages/countries, which would normally have all the special characters that I had manually simulated with Unicode macros. But I didn't see any "Polish (Macintosh)" layout variant when I went searching. I think most of the special characters that might be on a Mac with Polish keyboard while using the Option keys are probably all on the standard Polish layout in Linux. And the way to get to those additional level 3/4/5 characters in Linux is the Alt_Gr
key. That's just normally how it works in Linux, and that's why the Kinto developer made the Alt_Gr on Right Cmd
option, which I inherited in Toshy.
I have tried in the past to put another Alt_Gr
on the left side, or move them to the Option key position using a modmap
, but that never worked out well.
So using the keyboard in "Windows" mode, and relying on the Alt_Gr on Right Cmd
option, and setting the ISO level 3 Shift key to be the right side Alt key, is probably the best way of getting to those characters while using Linux.
I should note that "on Right Cmd" there is a reference to the virtualized Command key location next to the Space bar, even on a PC keyboard. Where the key is actually the Alt key.
If you were to run Linux on a real Mac or use an actual Apple keyboard, the Alt_Gr
key might indeed actually be located on the Option/Alt key. In theory you could try putting the MX keyboard in its Mac mode, but you would have to follow the instructions in this FAQ entry to force the keyboard to be identified by the Toshy config as an "Apple" type keyboard:
There is the "temporary" override, so you could quickly give it a try before deciding to edit the config file with the "permanent" solution.
Even if that works to put the Alt_Gr
on the Option key, it still will only work on the right side of the keyboard.
I wish I had a better answer, but this is just a very fundamental difference between macOS and Linux that can't be easily overcome with a keymapper. You will have to experiment with the exact solution you find most acceptable.
I'm still not exactly sure why your attempt to use the Meta/Super/Win key for ISO level 3 failed for those two characters, but one thing to realize is that when the modifiers are remapped with Kinto or Toshy, the Ctrl
keys become Meta
keys, and when you are in any app recognized by the config as a "terminal", those keys become Ctrl
keys again and there is no Meta
available anywhere on the keyboard while using a terminal. Normally this works out very well for simulating Mac-style keyboard shortcuts in both terminal and "GUI" applications in Linux. But that would be a reason not to attempt to use any "Win" key to do anything special in Linux, like ISO level 3 Shift.
If you get a headache from all this like I do, you'll have to come up with your own solution to that. 🍺 🍾
Thank you for help, I've switched to MacOS mode on Mx Keys, then I've set up left super as alternate characters key in linux keyboard settings and now it works fine. I am able to use mac os shortcuts and use polish letters at once.
Hello, I don't know how to configure keyboard settings for typing 3rd level chars in polish ą, ć, ę, ł, ń, ó, ś, ź, ż. On mac it is done by default on right options (ctrl) and I'm used to it. I'm using mx keys keyboard that has apple/windows layout.
Alt_Gr on Right Cmd key option allows me to put polish letters but with wrong key, I would like to have something like that but with right Options key. I figured out that I can activate additional layout options in gnome tweaks and turn on right win key to choose the 3rd level but it doesn't work with a (ą) and e (ę) letters.
Could I ask for advise?