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

Handling of UTF character codes and special character sequences #8

Open
whnr opened this issue Aug 25, 2023 · 0 comments
Open

Handling of UTF character codes and special character sequences #8

whnr opened this issue Aug 25, 2023 · 0 comments

Comments

@whnr
Copy link

whnr commented Aug 25, 2023

Hi!

I was playing around with the tool and found a few interesting issues. One of which I am trying to fix right now.
compose keymaps use things like <Right> for the right arrow key. That does not convert at the moment.
I tried to use the utf code \UF703 to achieve the same and it converted that like a normal string into single characters. I am trying to fix this right now to detect UTF characters.

Special sequences like \f are converted to the python \x0c during handling and back to \f in the output. That might also lead to unexpected behavior.

Examples below.

I'll update this when I have a working solution at least for the UTF handling.

Input

"(0)": ⓪ 
"\foo": asdfasdf 
\UF703: →

Output

{"§" = {
  "\\" = {
    "U" = {
      "F" = {
        "7" = {
          "0" = {
            "3" = ("insertText:", "→");
          };
        };
      };
    };
  };
  "\f" = {
    "o" = {
      "o" = ("insertText:", "asdfasdf");
    };
  };
  "(" = {
    "0" = {
      ")" = ("insertText:", "⓪");
    };
  };
};}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant