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

[Feature request] Key labels #835

Open
HaleyHalcyon opened this issue Dec 17, 2024 · 4 comments
Open

[Feature request] Key labels #835

HaleyHalcyon opened this issue Dec 17, 2024 · 4 comments

Comments

@HaleyHalcyon
Copy link

I have a keyboard layout with multiple invisible or hard-to-distinguish glyphs (types of spaces and variation selectors, mainly), and would like a custom label system, like is possible on MultiLing O Keyboard:

Approach 1: similar to <shift/>

A new tag could be added to modmap so that specific key contents could be replaced when shown as labels.

<label type="&x200B;" show="ZWSP" />
<label type="[email protected]" show="📧" />

Approach 2: key-level

Alternatively, each key could have a “label” parameter for each direction.

<key key0="&x200B;" label0="ZWSP"; key1="[email protected]" label1="📧" />
@Julow
Copy link
Owner

Julow commented Dec 19, 2024

This is possible (but not yet released): https://github.com/Julow/Unexpected-Keyboard/blob/master/doc/Possible-key-values.md#kind-str

The syntax is:

<key key0=":str symbol='ZWSP':'&x200B;'" key1=":str symbol='📧':'[email protected]'" />

@michele-bs
Copy link

michele-bs commented Dec 20, 2024

Imagine I want to write my email address - say '[email protected]' - when I press F1, with '@' shown on the F1 key.

<fn a="1" b=":str symbol='@:'[email protected]'">

Is this syntax correct? When will the :str kind be effective?

Thank you!

@Julow
Copy link
Owner

Julow commented Dec 21, 2024

That should work except that you missed a ', try using: <fn a="1" b=":str symbol='@':'[email protected]'" />
You can download the latest debug version of the app at the bottom of this page: https://github.com/Julow/Unexpected-Keyboard/actions/runs/12422549961
Otherwise, it'll be part of next release.

@michele-bs
Copy link

That should work except that you missed a ', try using: <fn a="1" b=":str symbol='@':'[email protected]'" /> You can download the latest debug version [...]

It works! 🙂

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

3 participants