Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] UCIS_SYM() - incorrect handling of names containing numbers #21128

Open
2 tasks
rubienr opened this issue Jun 4, 2023 · 2 comments
Open
2 tasks

[Bug] UCIS_SYM() - incorrect handling of names containing numbers #21128

rubienr opened this issue Jun 4, 2023 · 2 comments

Comments

@rubienr
Copy link

rubienr commented Jun 4, 2023

Describe the Bug

With UCIS_ENABLE = yes in rules.mk when defining a symbol whose name contains a number ([0-9]), the symbol name is never matched.

Example:

const ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
    UCIS_SYM("poop",    0x1F4A9), // 💩
    UCIS_SYM("grin",    0x1F600), // 😀
    UCIS_SYM("grin2",   0x1F601), // 😁
);

void ucis_symbol_fallback(void) {
    send_unicode_string("💩");
}
  • ⌨ grin -> 😀
  • ⌨ grin2 -> 💩 (expected 😁)

Suggestion:
Fix the line in process_ucis.c:41 in function is_uni_seq(char *seq) since the ASCII code '0' comes before '9' (asciitable.com):

Fix:

if ('0' <= seq[i] && seq[i] <= '9') {

Keyboard Used

Keychron Q6

Link to product page (if applicable)

Operating System

Linux

qmk doctor Output

No response

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

Additional Context

No response

@rubienr
Copy link
Author

rubienr commented Oct 28, 2023

Can somebody confirm this is the correct way to fix the issue? I'd then prepare a PR.

@rubienr
Copy link
Author

rubienr commented Oct 28, 2023

Probably related to #21659

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant