qmk/qmk_firmware

[Bug] Inconsistent results when using send_unicode_string

Open

#17,022 opened on 2022年5月6日

GitHub で見る
 (11 comments) (0 reactions) (0 assignees)C (43,867 forks)batch import
bughelp wanted

Repository metrics

Stars
 (20,368 stars)
PR merge metrics
 (平均マージ 20d 9h) (30d で 27 merged PRs)

説明

Describe the Bug

I've been using an idobai id80 ISO for little more than a year without any issues at all. Recently I recompiled the keyboard firmware with the latest QMK, last compile was several months ago.

I have a few unicode-macros set up, that are no longer working properly. One of them is supposed to output "(╯°□°)╯︵ ┻━┻"

If I hit the macro key ten times, I get this output:

(256f °25a1 °ff09 ╯fe35  ┻2501 ┻)
(256f °25a1 °ff09 ╯fe35  253b ━253b )
(256f °25a1 °ff09 ╯fe35  253b ━253b )
(256f °25a1 °ff09 ╯fe35  253b ━253b )
25(6f 25°a1 °)256f ︵0020 ┻2501 ┻)
2(56f °25a1 °ff09 ╯fe35 25 3b ━253b )
(256f °25a1 f°f09 ╯0020 ┻2501 ┻)
25(6f °25a1 ff°09 fe╯35 25 3b ━┻)
(256f °25a1 °ff09 ╯fe35  253b ━┻)
(╯°00b0 )256f 0020 ┻━┻)

As you can see, it's not consistent. There are some unicode characters that are entered correctly sometimes, and Ctrl+Shift+U and then manually entering the code works just fine.

This is how I have built the macro:

enum custom_keycodes {
    JAP_SHRUG = SAFE_RANGE
};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
    switch (keycode) {
    case JAP_SHRUG:
        if (record->event.pressed) {
            send_unicode_string("(╯°□°)╯︵ ┻━┻");
        } else {
            // when keycode is released
        }
        break;

I have then bound JAP_SHRUG to a keyboard key.

System Information

Keyboard: Idobao id80 ISO Revision (if applicable): v1 Operating system: Arch Linux qmk doctor output:

Ψ QMK Doctor is checking your environment.
Ψ CLI version: 1.0.0
Ψ QMK home: /home/scuttle/qmk_firmware
Ψ Detected Linux.
Ψ Git branch: master
Ψ Repo version: 0.16.9
Ψ All dependencies are installed.
Ψ Found arm-none-eabi-gcc version 11.3.0
Ψ Found avr-gcc version 8.3.0
Ψ Found avrdude version 6.4
Ψ Found dfu-util version 0.11
Ψ Found dfu-programmer version 0.7.2
Ψ Submodules are up to date.
Ψ QMK is ready to go

Any keyboard related software installed?

  • AutoHotKey (Windows)
  • Karabiner (macOS)
  • Other:

Additional Context

コントリビューターガイド