Skip to content

Commit

Permalink
feat(parser): add optional display-name to layer (#20)
Browse files Browse the repository at this point in the history
Add support for an optional label property in layers
which can match zero or once.

In ZMK each layer can be assigned a display-name. One use case for
the label is that it can be shown in display widgets.

See zmkfirmware/zmk#551
  • Loading branch information
huber-th authored Jan 9, 2024
1 parent 8c801ce commit f7d96b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/keymap/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ type Layer struct {
Pos lexer.Position

Name string `parser:"@Ident '{'"`
DisplayName string `parser:"('display-name' '=' @String';')?"`
Bindings []*Behavior `parser:"'bindings' '=' '<'@@+'>'';'"`
SensorBindings []*Behavior `parser:"('sensor''-''bindings' '=' '<'@@+'>'';')?"`
EndBrace string `parser:" '}'';'"`
Expand Down

0 comments on commit f7d96b1

Please sign in to comment.