pqrs-org / Karabiner-archived

Karabiner (KeyRemap4MacBook) is a powerful utility for keyboard customization.
https://pqrs.org/osx/karabiner/
The Unlicense
3.82k stars 309 forks source link

concurrence between events #803

Closed de-arl closed 7 years ago

de-arl commented 7 years ago

I want to change small letter GERMAN_O_UMLAUT to opening curly bracket and capital letter GERMAN_O_UMLAUT to closing curly bracket. I made two items enabling each, but the closing bracket only works when the opening bracket remapping is disabled. How to solve this conflict?

private.pdf

dunkarooftop commented 7 years ago

change line 17 to

KeyCode::GERMAN_O_UMLAUT, ModifierFlag::NONE,

The ModifierFlag::NONE mean change only apply when no other modifier is pressed.

The order of the mod is important, you can find more info about it in doc https://pqrs.org/osx/karabiner/xml.html.en search for "Order of <autogen>"

Another way to fix it is reverse the order of your last 2 autogen mod.

at the doc also search "Specify input source" that might be the answer to your other question. <inputsource_only>GERMAN</inputsource_only> might solve the problem you have and don't have to use RawValue any more.

EDIT: Just took another look the above last statement is not be true, I will look around more.

EDIT2: Have another look is GERMAN_O_UMLAUT = RawValue::0x29 ? I don't know German layout. You might wanna search "New keycode definition" at the doc too. You can define your own German keycode there to avoid using RawValue for code readability

EDIT3: Just went to wiki and learned about the German layout, it's totally not what I assumed. It work so differently. My suggestion for ModifierFlag::NONE in line 17 is base on my assumption that o + SHIFT produce O does it not?

de-arl commented 7 years ago

Thanks a lot. The problem is solved with the use of ModifierFlag::NONE. Changing the order of the items also works to solve the conflict! Either one solution works for itself as they work together.

For your interest: GERMAN_O_UMLAUT = RawValue::0x29 is true

Your assumption ö + SHIFT produce Ö is wrong, but the solution with ModifierFlag::NONE works anyway. ö + shift produces é. That is because I have a macbook with swiss key layout. That's not the same as a German layout, on which your assumption would be true.

Thank you!