JSubelj / g910-gkey-macro-support

GKey support for Logitech G910 Keyboard on Linux
GNU General Public License v3.0
99 stars 31 forks source link

[Issue] Typeout `"\`"` doesn't work #56

Closed Ginden closed 2 years ago

Ginden commented 2 years ago

Describe the bug

My config includes:

    "g1": {
        "hotkey_type": "typeout",
        "do": "`"
    },

When I press G1, it types out: § (§ character followed by space).

If I change G1 to any other string, eg. foobar, it works correctly.

To Reproduce

Expected behavior

I expected backtick to be typed out.

Screenshots If applicable, add screenshots to help explain your problem.

Additional info

Logs:

2022-01-19 13:14:02,483 [INFO] {lib.functionalities.gkey_functionality} - g1 pressed, typing out: '`'

Running as service.

Complete config:

{
    "__comment": "following hotkey types are supported: nothing, typeout, shortcut and run; only en and si keyboard mappings are currently supported",
    "keyboard_mapping": "si",
    "g1": {
        "hotkey_type": "typeout",
        "do": "`"
    },
    "g2": {
        "hotkey_type": "nothing",
        "do": ""
    },
    "g3": {
        "hotkey_type": "nothing",
        "do": ""
    },
    "g4": {
        "hotkey_type": "nothing",
        "do": ""
    },
    "g5": {
        "hotkey_type": "nothing",
        "do": ""
    },
    "g6": {
        "hotkey_type": "nothing",
        "do": ""
    },
    "g7": {
        "hotkey_type": "nothing",
        "do": ""
    },
    "g8": {
        "hotkey_type": "nothing",
        "do": ""
    },
    "g9": {
        "hotkey_type": "nothing",
        "do": ""
    }
}

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Ginden commented 2 years ago

Responsible line:

https://github.com/JSubelj/g910-gkey-macro-support/blob/master/lib/data_mappers/char_uinput_mapper.py#L177

JSubelj commented 2 years ago

Hey,

what keyboard do you have set up on your OS and what keyboard mapping do you have setup in your config? If those two don't match then you will have problems with different mapping. You can always write your own mapping for your language or you can use shortcut hotkey type and type out the wanted character.

Ginden commented 2 years ago

@JSubelj Changing keyboard mapping to en fixed a issue.

Though, it's very surprising behaviour.

As side note - can you review #47 ?