pqrs-org / Karabiner-Elements

Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra (10.12) or later.
https://pqrs.org/osx/karabiner/
The Unlicense
18.56k stars 834 forks source link

Default Keymapping is wrong #2784

Open kmplngj opened 3 years ago

kmplngj commented 3 years ago

Hello,

I use Karabiner since months with the same keyboard. Starting today my keys are not registered the right way.

Examples

Shift + 0 gives me a 0 Shift + - gives me a = = gives me a ^

I did not change my config since May. Problems seems that my Mac thinks my keyboard would be other country style. I have an ANSI one. I already tried to disable all modification and created an empty profile. No luck.

When I disable the keyboard under Devices Basic Configuration or Quit Karabiner Ehements my keys are correct.

MacOS 11.5.1 Karabiner 13.5.0 and 13.5.1

What could be wrong?

Thanks for the help Jan

MuhammedZakir commented 3 years ago

Does this happen even if you choose the keyboard type manually [1]?

[1] https://karabiner-elements.pqrs.org/docs/manual/configuration/configure-keyboard-type/

marcofeltmann commented 3 years ago

@MuhammedZakir It does, at least for me.

I have an RGO Split keyboard which is unable to pass the SHIFT button from one side to the other through the system.

When I change the keyboard type manually I press on the < button to the right of the leftmost SHIFT. But in TextEdit and thelike it is the ^ button printed to the left of the 1 underneath the ESC key. Somewhat annoying during coding, though.

As soon as I quit Karabiner-Elements, it works perfectly fine. Restarting Karabiner-Elements and it's all wrong again.

Manually setting the keyboard type shows "Hantick device" in both cases, so it looks like there is something overwritten by Karabiner-Elements.

Unfortunately my C++ suxx (I'm only good at Objective-C and Swift), so I cannot provide any pull request. ☹️

marcofeltmann commented 3 years ago

Guess I found some workaround.

You could open the command line and copy the preferences of your keyboard to some writable place:

$ cp /Library/Preferences/com.apple.keyboardtype.plist ~/Desktop 

When you access this with Xcode, you'll find some information:

Key Type Value
8584-2321-0 Number 41
10203-5824-0 Number 40

The first being the product-vendor-country id triple of my keyboard that Karabiner-Elements maps to, the second being the product-vendor-country id triple that Karabiner-Elements provides in its Virtual Keyboard tab.

So updating the value of the Karabiner-Elements to the one of the working keyboard, saving it back and restart the machine solved the problem for me.

$ sudo cp ~/Desktop/com.apple.keyboardtype.plist /Library/Preferences/com.apple.keyboardtype.plist 
Password:

Inspiration found at: https://apple.stackexchange.com/a/258353


So, the question is: What does the virtual keyboard of Karabiner-Elements do different than the real keyboard when macOS asks for the keyboard recognition?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.