Swordfish90 / cool-retro-term

A good looking terminal emulator which mimics the old cathode display...
22.25k stars 847 forks source link

No support for dvorak (or supposedly others) keyboard layout #451

Open casperravenhorst opened 6 years ago

casperravenhorst commented 6 years ago

On macOS, this app takes its inputs from scancodes, not letting the OS translate them to the (ascii?) codes as usual for other apps. Not sure if supporting multiple keyboard layouts is doable, but a lot of countries probably use (if only slightly, see france germany etc) different layouts.

whyboris commented 6 years ago

Confirming that I can't use Dvorak on macOS -- cool-retro-term disregards my current keyboard layout (switching back and forth the layout setting doesn't affect the terminal).

whyboris commented 6 years ago

Looks like the situation is a bit worse -- I'm on macOS with Dvorak layout turned on: When I use the keyboard's asdf keys it types asdf characters in the terminal (sort-of expected since cool-retro-term can't use Dvorak yet), but when I press the comma or a period (, or . ) keys, w, and v appear (the characters I'd expect if Dvorak was working). Unsure if it's partially good news -- but it also means I can't access , or . in cool-retro-term 😕 When I switch to the standard QWERTY layout on the Mac, I can successfully type in the , and . characters using the default keyboard keys.

I wonder if it's getting fixed with this PR: https://github.com/Swordfish90/cool-retro-term/pull/446 (see line 1027 and 1033)

whyboris commented 6 years ago

Is getting the Dvorak keyboard layout just a matter of adding some file here: https://github.com/Swordfish90/qmltermwidget/tree/master/lib/kb-layouts ? If that's all it takes, I'm willing to create a file (provided I get a little guidance about how things work)

whyboris commented 6 years ago

Unbelievably -- today I launched the app by accident and it is working with Dvorak!!! 🎉 No idea why this difference. But very exciting!

cascassette commented 6 years ago

Not here. What did you do?

whyboris commented 6 years ago

The app hasn't been updated, so it might be some weird combination of settings. I now suspect it might have something to do with the login screen on Mac: Mac has a bug that when you are on Dvorak, the login screen might still be on QWERTY and vice versa -- they are independent. I'll play around and if I figure something out -- I'll share here. As of now I'm unsure.

bayabyum commented 5 years ago

Even weirder... I'm using Programmer Dvorak (also on Mac), and I get QWERTY with all the letter keys, but it uses Programmer Dvorak for the number keys. And it can use Hangul (the Korean alphabet) just fine if I switch the layout to Korean. It never did anything like this on Linux.

dessalines commented 5 years ago

I can verify that dvorak is working fine on linux.

whyboris commented 5 years ago

I'm on cool-retro-term version 1.1.1 and even though my Mac is set to Dvorak the home keys are asdf and jkls (QWERTY layout except for the : which ends up as s ⚠️ ).

Similarly the <, >, and ? get mapped to w, v, and z (as a Dvorak layout would).

So I get neither QWERTY nor DVORAK. The problem goes away and I get full QWERTY when I switch the computer setting to the QWERTY layout, but I can't get Dvorak support 😢

I would love for Dvorak to be supported.

Is it straight-forward to add the support? I'm willing to open a PR if someone could point me in the direction of how to fix things.

wasp604 commented 5 years ago

What bothers me the most is that a previous version of CRT did support Dvorak, but since I updated to 1.1.1 it forces me to use QWERTY. If an update broke Dvorak, it should be easy enough to undo it, no?

I am on an iMac, by the way.

Confirmed: version 1.0.1 has full Dvorak support, and 1.1.0 does not.

lraulin commented 5 years ago

Programmer Dvorak works on 1.0.1 too!

justinmayer commented 5 years ago

I can confirm that using cool-retro-term 1.1.1 with the Colemak keyboard layout setting (System Preferences > Keyboard > Input Sources > Colemak) on macOS 10.13.6 yields the incorrect behavior described in this issue — QWERTY appears to be used instead. Downgrading to cool-retro-term 1.0.1 restores the correct behavior, with the Colemak layout yielding the correct characters.

mblarsen commented 5 years ago

Ditto everything with Colemak 1.0.1 is working 1.1.1 isn't

Swordfish90 commented 5 years ago

Are you able to reproduce this issue with the latest upstream version? I'm trying to figure out if it's a regression CRT side. https://github.com/lxqt/qtermwidget

justinmayer commented 5 years ago

@Swordfish90: I visited the repo link you posted but have no idea what it is or how exactly I would use it on macOS to reproduce the issue.

TheGrandmother commented 5 years ago

I'm having this issue as well with a custom keyboard layout enabled via setxkbmap. Although for me it works if i run setxkbmap in cool-retro-terminal

find1dream commented 4 years ago

Temporary solutions for using programmer dvorak (or others) on Mac os:

  1. Choose your keyboard input source as Australian (Depending on your keyboard, you should try another one if the result is not desired. )
  2. Install Karabiner-elements
  3. Import programmer dvorak from https://pqrs.org/osx/karabiner/complex_modifications/?q=programmer
  4. Enjoy
g012 commented 4 years ago

Well I'm using karabiner and an uncommon layout. The keys of the layout work fine, but I have some combinations, such as fn + ijkl mapped to arrows, and for ijkl keys it does input ijkl instead of the expected cstn in my layout. Weird (and unusable). Same for my keys which have a secondary mapping with right cmd + key (asdf, etc.).