qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
17.47k stars 37.7k forks source link

Language related send_string issue #23946

Closed zadorid88 closed 2 weeks ago

zadorid88 commented 2 weeks ago

Issue Description

Hi,

First time ever trying to code something, and I am stuck.

I need a macro which does two simple key taps: "LALT" first, than "ő". I used

include "keymap_hungarian.h"

include "sendstring_hungarian.h"

but the string doesn't seem to know this "ő" letter, no matter what I do.

I can program the letter to a dedicated key using "HU_ODAC", which is the code from the "keymap_hungarian.h", but it doesn't work in sendstring.

I tried: SEND_STRING(SS_TAP(X_LALT)"ODAC") SEND_STRING(SS_TAP(X_LALT)"Ő") SEND_STRING(SS_TAP(X_LALT)"HU_ODAC") SEND_STRING(SS_TAP(X_LALT)"X_ODAC") but no luck.

Please help!

fauxpark commented 2 weeks ago

Please read the docs: https://docs.qmk.fm/features/send_string#send-string Only ASCII characters are supported.

zadorid88 commented 2 weeks ago

Thank you!

fauxpark commented 2 weeks ago

To clarify, the sendstring header is mainly to map the ASCII character set to the appropriate keycodes for the specific language. It does not allow you to use any character from that language in sendstrings.

You can still call tap_code() (and tap_code16() for modified keycodes) with the keycodes from the keymap header. For short sequences like Alt+ő this is preferable to sendstring anyway as that's mostly for typing out longer things like sentences.

zadorid88 commented 2 weeks ago

Wow, this worked, thank you very much! :)