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

Special Characters #3

Open
DJDevon3 opened this issue Mar 31, 2024 · 0 comments
Open

Special Characters #3

DJDevon3 opened this issue Mar 31, 2024 · 0 comments

Comments

@DJDevon3
Copy link
Contributor

I'm not sure how to best deal with special character switching. We might need some exceptions. Default json has

"base_grid_size": [
    14,
    5

I'm thinking something like

"special_grid_size": [
    14,
    5

and

"emoji_grid_size": [
    14,
    5

appended to the bottom of the json. that should provide endpoints for mode switches and popup windows with different character selections like on a mobile device. due to the size of TFT's I think the default should be the mobile device layout.

Here's an example for special character layout

{
  "special_grid_size": [
    10,
    4
  ],
  "rows": [
    {
      "name": "row0",
      "keys": [
        {
          "label": "1"
        },
        {
          "label": "2"
        },
        {
          "label": "3"
        },
        {
          "label": "4"
        },
        {
          "label": "5"
        },
        {
          "label": "6"
        },
        {
          "label": "7"
        },
        {
          "label": "8"
        },
        {
          "label": "9"
        },
        {
          "label": "0"
        }
      ]
    },
    {
      "name": "row1",
      "keys": [
        {
          "label": "-"
        },
        {
          "label": "/"
        },
        {
          "label": "\:"
        },
        {
          "label": ";"
        },
        {
          "label": "("
        },
        {
          "label": ")"
        },
        {
          "label": "$"
        },
        {
          "label": "&"
        },
        {
          "label": "@"
        },
        {
          "label": ""
        }
      ]
    },
    {
      "name": "row2",
      "keys": [
        {
          "label": "#+="
        },
        {
          "label": "."
        },
        {
          "label": ","
        },
        {
          "label": "?"
        },
        {
          "label": "!"
        },
        {
          "label": "'"
        },
        {
          "label": "\uf191",
          "key_value": 42,
          "font": "symbol_font",
          "scale": 1,
          "col_span": 4
        }
      ]
    },
    {
      "name": "row3",
      "keys": [
        {
          "label": "ABC",
          "key_value": 225,
          "col_span": 2
        },
        {
          "label": ":)",
          "key_value": 226
        },
        {
          "label": "space",
          "key_value": " ",
          "col_span": 5
        },
        {
          "label": "return",
          "key_value": 40,
          "col_span": 4
        }
      ]
    }
  ]
}

This is equivalent to pressing the "123" key on iOS mobile keyboards.

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