Parsing support for multiple keysyms per entry
Instead of allowing only one keysym per level per group, do as the external API indicates and allow multiples. The existing syntax is: key <AD01> { [ q, Q ] }; where the new syntax is: key <AD01> { [ q, Q, { H, E, L, L, O }, { Y, E, S, space, T, H, I, S, space, I, S, space, D, O, G } }; to make the key in the extreme top left of the keyboard do pretty surprising things in levels 3 and 4. Signed-off-by: Daniel Stone <daniel@fooishbar.org>master
parent
36b8771e1f
commit
9cdc1990fa
|
@ -145,7 +145,7 @@ extern int yylex(union YYSTYPE *val, struct YYLTYPE *loc, void *scanner);
|
||||||
%type <str> KeyName MapName OptMapName KeySym
|
%type <str> KeyName MapName OptMapName KeySym
|
||||||
%type <sval> FieldSpec Ident Element String
|
%type <sval> FieldSpec Ident Element String
|
||||||
%type <any> DeclList Decl
|
%type <any> DeclList Decl
|
||||||
%type <expr> OptExprList ExprList Expr Term Lhs Terminal ArrayInit
|
%type <expr> OptExprList ExprList Expr Term Lhs Terminal ArrayInit KeySyms
|
||||||
%type <expr> OptKeySymList KeySymList Action ActionList Coord CoordList
|
%type <expr> OptKeySymList KeySymList Action ActionList Coord CoordList
|
||||||
%type <var> VarDecl VarDeclList SymbolsBody SymbolsVarDecl
|
%type <var> VarDecl VarDeclList SymbolsBody SymbolsVarDecl
|
||||||
%type <vmod> VModDecl VModDefList VModDef
|
%type <vmod> VModDecl VModDefList VModDef
|
||||||
|
@ -722,8 +722,19 @@ OptKeySymList : KeySymList { $$= $1; }
|
||||||
|
|
||||||
KeySymList : KeySymList COMMA KeySym
|
KeySymList : KeySymList COMMA KeySym
|
||||||
{ $$= AppendKeysymList($1,$3); }
|
{ $$= AppendKeysymList($1,$3); }
|
||||||
|
| KeySymList COMMA KeySyms
|
||||||
|
{
|
||||||
|
$$= AppendKeysymList($1, strdup("NoSymbol"));
|
||||||
|
FreeStmt(&$3->common);
|
||||||
|
}
|
||||||
| KeySym
|
| KeySym
|
||||||
{ $$= CreateKeysymList($1); }
|
{ $$= CreateKeysymList($1); }
|
||||||
|
| KeySyms
|
||||||
|
{ $$= CreateKeysymList(strdup("NoSymbol")); }
|
||||||
|
;
|
||||||
|
|
||||||
|
KeySyms : OBRACE KeySymList CBRACE
|
||||||
|
{ $$= $2; }
|
||||||
;
|
;
|
||||||
|
|
||||||
KeySym : IDENT { $$= $1; }
|
KeySym : IDENT { $$= $1; }
|
||||||
|
|
Loading…
Reference in New Issue