@@ -40,15 +40,17 @@ var (
4040 gohelp .Item ("Key modifiers" , "super, ctrl, alt, shift (lowercase, no left/right distinction)" ),
4141 gohelp .Item ("Keys" , "lowercase letters, numbers, special keys (print, space, etc.)" ),
4242 gohelp .Item ("Axis inputs" , "x, y, z, rx, ry, rz, abs_x, abs_y, etc. with +/- direction (see 'help axis')" ),
43+ gohelp .Item ("Remap output" , ">key, >lclick, >scrollup - inject key/mouse/scroll events (see 'help remap')" ),
4344 gohelp .Item ("Syntax" , "Use + to separate modifiers and key" , "\" super+t\" = \" alacritty\" " ),
4445 gohelp .Item ("Triggers" , ".onpress (default), .hold, .doubletap, .taphold, .pressrelease, .longpress, etc." ),
4546 gohelp .Item ("Modifiers" , ".switch, .repeat, .passthrough" ),
4647 ).
4748 Section ("Examples" ,
4849 gohelp .Item ("Tap modifier key" , "Execute command on modifier release" , "\" super.pressrelease\" = [\" \" , \" rofi\" ]" ),
4950 gohelp .Item ("Launch terminal" , "Simple key combo" , "\" super+t\" = \" alacritty\" " ),
50- gohelp .Item ("Toggle auto-clicker" , "Repeat while held or toggle on press" , "\" f9.onpress.repeat\" = \" xdotool click 1 \" " ),
51+ gohelp .Item ("Toggle auto-clicker" , "Remap key to mouse click, repeat on press" , "\" f9.onpress.repeat\" = \" >lclick \" " ),
5152 gohelp .Item ("Axis scrolling" , "Touchstrip or peripheral axis input" , "\" rx+\" = \" >scrollup\" " ),
53+ gohelp .Item ("Key to mouse button" , "Remap any key to mouse click" , "\" f1\" = \" >lclick\" " ),
5254 ).
5355 Section ("[command_variables]" ,
5456 gohelp .Item ("browser" , "Reusable command alias" , "browser = \" brave-browser --new-window\" " ),
@@ -123,9 +125,34 @@ var (
123125 gohelp .Item ("Auto-detection" , "Most devices auto-detected by capability flags" ),
124126 gohelp .Item ("Explicit grab" , "Add device name substring to [settings] devices array" , "devices = [\" Tablet Monitor Touch Strip\" ]" ),
125127 )
128+
129+ helpRemap = gohelp .NewPage ("remap" , "key and mouse button injection" ).
130+ Text ("Remap syntax (> prefix) injects keyboard keys, mouse buttons, and scroll events via evdev." ).
131+ Section ("Syntax" ,
132+ gohelp .Item (">key" , "Tap key combo (press and release)" , "\" >return\" , \" >ctrl+c\" , \" >super+t\" " ),
133+ gohelp .Item (">>key" , "Hold key forever (until << releases)" , "\" >>shift\" " ),
134+ gohelp .Item ("<key" , "Release single key" , "\" <shift\" " ),
135+ gohelp .Item ("<<" , "Release all persistent held keys" , "\" <<\" " ),
136+ ).
137+ Section ("Mouse Buttons" ,
138+ gohelp .Item ("Left click" , "lclick, leftclick, lbutton, leftbutton, mouse1, btn_left" , "\" >lclick\" " ),
139+ gohelp .Item ("Right click" , "rclick, rightclick, rbutton, rightbutton, mouse2, btn_right" , "\" >rclick\" " ),
140+ gohelp .Item ("Middle click" , "mclick, middleclick, mbutton, middlebutton, mouse3, btn_middle" , "\" >mclick\" " ),
141+ gohelp .Item ("Forward/Back" , "forward/mouse4, back/mouse5, btn_side, btn_extra" , "\" >forward\" " ),
142+ ).
143+ Section ("Scroll/Wheel" ,
144+ gohelp .Item ("Vertical" , "scrollup/wheelup, scrolldown/wheeldown" , "\" >scrollup\" " ),
145+ gohelp .Item ("Horizontal" , "scrollleft/wheelleft, scrollright/wheelright" , "\" >scrollleft\" " ),
146+ ).
147+ Section ("Examples" ,
148+ gohelp .Item ("Auto-clicker" , "Toggle mouse click on/off" , "\" f9.onpress.repeat\" = \" >lclick\" " ),
149+ gohelp .Item ("Remap key to click" , "F1 triggers left click" , "\" f1\" = \" >lclick\" " ),
150+ gohelp .Item ("Key to scroll" , "F2/F3 scroll up/down" , "\" f2\" = \" >scrollup\" " ),
151+ gohelp .Item ("Sticky modifier" , "Hold shift, release later" , "\" f5\" = \" >>shift\" \n \" f6\" = \" <<\" " ),
152+ )
126153)
127154
128155// Help displays usage information or topic-specific help.
129156func Help (args ... string ) {
130- gohelp .Run (append ([]string {"help" }, args ... ), helpRoot , helpConfig , helpOverlays , helpModifiers , helpAxis )
157+ gohelp .Run (append ([]string {"help" }, args ... ), helpRoot , helpConfig , helpOverlays , helpModifiers , helpAxis , helpRemap )
131158}
0 commit comments