feat(developer): add newLayer() and oldLayer() statements to Keyman Keyboard Language
- Dominant language
- Pascal
- Stars
- 534
- Forks
- 143
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 113
Description
There are currently two shorthand forms of `if()` statements, namely `platform()` and `baselayout()`, for checking the value of system stores in the input section of rules:
- `platform("platformConstraint")` is equivalent to` if(&platform = "platformConstraint")`
- `baselayout(layoutName)` is equivalent to `if(&baselayout = layoutName)`
Two further possibilities are two new shorthand forms for the `&newLayer` and `&oldLayer` system stores used in touch keyboards:
- `newLayer('shift')` is equivalent to` if(&newLayer = 'shift')` (see [docs](https://help.keyman.com/developer/language/reference/newlayer))
- `oldLayer('shift')` is equivalent to` if(&oldLayer = 'shift')` (see [docs](https://help.keyman.com/developer/language/reference/oldlayer))
This change could be limited to thenext generation KMN compiler, or could be backported as well.
### 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
Contributor guide
Assessment
This issue has not been assessed yet.