Skip to content

Handling of UTF character codes and special character sequences #8

@whnr

Description

@whnr

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:", "⓪");
    };
  };
};}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions