Cleanup input handling

We now use uncontextualized event name from lisgd as leftrightcorner. We
will determine the action name only in the input handler. It allow
events to match multiple action depending on contexts.

We also add some basics events as left/rigth/up/down and
twoleft/tworight/twoup/twodown and use some of them.

Use use twoup and twodown to scroll in less and right left to
change the page.

We also prefer use case switch instead of if conditions.

We remove this HANDLE variable usage and exit directly when the event
has been handled.

We also add some methods as type, key or typeenter to simplify some
code.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Stacy Harper 2021-06-12 13:33:35 +02:00 committed by Maarten van Gompel
parent a3d13c6c7d
commit c427a0eb7b
2 changed files with 242 additions and 188 deletions

View file

@ -24,26 +24,32 @@ else
-g '1,DLUR,BL,*,sxmo_inputhandler.sh bottomleftcorner' \
-g '1,ULDR,TL,*,sxmo_inputhandler.sh topleftcorner' \
-g '1,URDL,TR,*,sxmo_inputhandler.sh toprightcorner' \
-g '1,LR,B,L,sxmo_inputhandler.sh enter' \
-g '1,RL,B,L,sxmo_inputhandler.sh back' \
-g '1,LR,L,*,sxmo_inputhandler.sh prevdesktop' \
-g '1,RL,R,*,sxmo_inputhandler.sh nextdesktop' \
-g '1,DU,L,*,P,sxmo_inputhandler.sh volup' \
-g '1,UD,L,*,P,sxmo_inputhandler.sh voldown' \
-g '1,LR,T,*,P,sxmo_inputhandler.sh brightnessup' \
-g '1,RL,T,*,P,sxmo_inputhandler.sh brightnessdown' \
-g "1,DU,B,*,sxmo_inputhandler.sh showkeyboard" \
-g "1,UD,B,*,sxmo_inputhandler.sh hidekeyboard" \
-g "1,UD,T,*,sxmo_inputhandler.sh showmenu" \
-g "1,DU,T,*,sxmo_inputhandler.sh hidemenu" \
-g "2,UD,T,*,sxmo_inputhandler.sh showsysmenu" \
-g "2,UD,B,*,sxmo_inputhandler.sh closewindow" \
-g "3,UD,B,*,sxmo_inputhandler.sh killwindow" \
-g '2,RL,*,*,sxmo_inputhandler.sh moveprevdesktop' \
-g '2,LR,*,*,sxmo_inputhandler.sh movenextdesktop' \
-g '1,DU,R,*,P,sxmo_inputhandler.sh scrollup_short' \
-g '1,UD,R,*,P,sxmo_inputhandler.sh scrolldown_short' \
-g '1,LR,R,S,sxmo_inputhandler.sh scrollright_short' \
-g '1,RL,L,S,sxmo_inputhandler.sh scrollleft_short' \
-g '1,LR,B,L,sxmo_inputhandler.sh rightbottomcorner' \
-g '1,RL,B,L,sxmo_inputhandler.sh leftbottomcorner' \
-g '1,LR,L,*,sxmo_inputhandler.sh rightleftcorner' \
-g '1,RL,R,*,sxmo_inputhandler.sh leftrightcorner' \
-g '1,DU,L,*,P,sxmo_inputhandler.sh upleftcorner' \
-g '1,UD,L,*,P,sxmo_inputhandler.sh downleftcorner' \
-g '1,LR,T,*,P,sxmo_inputhandler.sh righttopcorner' \
-g '1,RL,T,*,P,sxmo_inputhandler.sh lefttopcorner' \
-g "1,DU,B,*,sxmo_inputhandler.sh upbottomcorner" \
-g "1,UD,B,*,sxmo_inputhandler.sh downbottomcorner" \
-g "1,UD,T,*,sxmo_inputhandler.sh downtopcorner" \
-g "1,DU,T,*,sxmo_inputhandler.sh uptopcorner" \
-g "2,UD,T,*,sxmo_inputhandler.sh twodowntopcorner" \
-g "2,UD,B,*,sxmo_inputhandler.sh twodownbottomcorner" \
-g "r,UD,B,*,sxmo_inputhandler.sh threedownbottomcorner" \
-g '1,DU,R,*,P,sxmo_inputhandler.sh uprightcorner' \
-g '1,UD,R,*,P,sxmo_inputhandler.sh downrightcorner' \
-g '1,LR,R,S,sxmo_inputhandler.sh rightrightcorner_short' \
-g '1,RL,L,S,sxmo_inputhandler.sh leftrightcorner_short' \
-g '1,RL,*,*,sxmo_inputhandler.sh left' \
-g '1,LR,*,*,sxmo_inputhandler.sh right' \
-g '1,DU,*,*,sxmo_inputhandler.sh up' \
-g '1,UD,*,*,sxmo_inputhandler.sh down' \
-g '2,RL,*,*,sxmo_inputhandler.sh twoleft' \
-g '2,LR,*,*,sxmo_inputhandler.sh tworight' \
-g '2,DU,*,*,sxmo_inputhandler.sh twoup' \
-g '2,UD,*,*,sxmo_inputhandler.sh twodown' \
>"$CACHEDIR/lisgd.log" 2>&1 &
fi