keymanapp / keymanapp/keyman

feat(developer): In touch layout editor, add button to generate ID from Unicode text field

Open
#11,122 1 comment 0 reactions 1 assignee Claimed by @mcdurdin View on GitHub
developer/ developer/ide/ feat
Dominant language
Pascal
Stars
534
Forks
143
Avg merge
2d 10h
Merged PRs (30d)
113

Description

### Is your feature request related to a problem? Please describe.

In one keyboard, I needed to made a bunch of longpress keys. For each one I pasted in the desired character in the "Text:" field, then used what appeared in the "Text Unicode:" field after pasting the character as the basis for a new "U_" value for the "ID:" field (that would produce the Unicode character). I found myself wishing for a button that would create a new ID value from the "Text Unicode:" field.

### Describe the solution you'd like

Add a button (perhaps next to the "ID:" label, represented by the empty rectangle in the image below) or some other mechanism that would create a new ID value from the "Text Unicode:" field.
![kXvD9gSFEtkOOu7A](https://github.com/keymanapp/keyman/assets/8562172/d2256be6-e0d8-42a0-9403-64a99ffe1af4)
Pressing the button would take the "U+00CF" value from the "Text Unicode:" field and create a new "ID:" field value of "U_00CF". Similarly, a "Text Unicode:" value of "U+01DD U+0308" would generate an "ID:" value of "U_01DD_0308".

Need to handle empty or invalid "Text Unicode:" field.

Do we need a confirmation box? If so, it should have a "Don't show this again" option. If the existing ID is "T_new_..." I don't think there's any need to ask before replacing.

Are Tooltips dynamic? Tooltip for this button could be generic "Replace ID with U_xxxx value based on Text Unicode value" or tailored to actual Text Unicode value: "Change ID to U_01DD_0308"

The image is for a longpress key, but the same button should be added to the base key as well.

Legend for button: "Create from Text Unicode" is pretty long! Would "From Text" work for the button label (and rely on the Tooltip to give a further explanation)?

### Describe alternatives you've considered

Manually typing what's in the Text Unicode field, remembering to change the `+` to `_` each time. For reference, I created about 60 longpress keys and made 3 mistakes (forgot to change the ID field, mistyped the Unicode value, forgot to change `+` to `_`). Having this feature might have saved me 15-30 minutes, perhaps, so not a huge savings, but improved user experience and increased accuracy.

### Related issues

_No response_

### Keyman apps

- [ ] Keyman for Android
- [ ] Keyman for iPhone and iPad
- [ ] Keyman for Linux
- [ ] Keyman for macOS
- [ ] Keyman for Windows
- [X] Keyman Developer
- [ ] KeymanWeb
- [ ] Other - give details at bottom of form

### Keyman version

17.0.295-beta

### Operating system

Windows 11

### Device

_No response_

### Target application

_No response_

### Browser

_No response_

### Keyboard name

_No response_

### Keyboard version

_No response_

### Language name

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.