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>
%type <str> KeyName MapName OptMapName KeySym
%type <sval> FieldSpec Ident Element String
%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 <var> VarDecl VarDeclList SymbolsBody SymbolsVarDecl
%type <vmod> VModDecl VModDefList VModDef
KeySymList : KeySymList COMMA KeySym
{ $$= AppendKeysymList($1,$3); }
+ | KeySymList COMMA KeySyms
+ {
+ $$= AppendKeysymList($1, strdup("NoSymbol"));
+ FreeStmt(&$3->common);
+ }
| KeySym
{ $$= CreateKeysymList($1); }
+ | KeySyms
+ { $$= CreateKeysymList(strdup("NoSymbol")); }
;
+KeySyms : OBRACE KeySymList CBRACE
+ { $$= $2; }
+ ;
+
KeySym : IDENT { $$= $1; }
| SECTION { $$= strdup("section"); }
| Integer