keymanapp / keymanapp/keyman

feat(developer,web): separate layer id from default modifier for layer in keyman-touch-layout

Open
#7,552 0 comments 0 reactions 0 assignees View on GitHub
developer/ developer/compilers/ developer/ide/ feat web/ web/engine/
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.

The ability to specify custom layer ids is currently problematic, because we parse the layer id to identify the default modifiers for the layer that are passed through to Keyman rules.

Furthermore, the substrings in layer identifiers as they currently stand are different to the modifier key names that we use in .kmn, which just adds to the cognitive load (e.g. `rightalt` vs `RALT`).

Example: `rightalt-nocaps` is currently matched as Right Alt+Caps due to a naive substring search for `caps`!

There could be other similar examples, such as embedding 'alt' in a longer word.

### Describe the solution you'd like

Going forward, it would be better to improve the .keyman-touch-layout format to include a "default modifier" property for each layer, which is completely isolated from the layer id; if this was present in the file, then the layer id then would not affect the default modifier for the layer.

When we fix this, we should ensure that the well-defined layer identifiers, such as 'default', are all clearly documented, along with the meaning and behaviour that Keyman Engine for Web assigns to them.

### Describe alternatives you've considered

_No response_

### Related issues

* #7551
* https://community.software.sil.org/t/bug-introduced-in-cameroon-keyboard-by-km-15-web-android/6834/4

### Keyman apps

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

### Keyman version

15.0

### Operating system

_No response_

### 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.