Hiding the Mouse Cursor on the labwc and Wayland Player
Add one keybind and one autostart line and the cursor is hidden on every boot.
This applies to the Raspberry Pi player running labwc on Wayland. It has three parts: install wtype, add a keybind to rc.xml that hides the cursor and moves it off screen, and add a line to autostart so the keybind fires on boot. For the player itself see Raspberry Pi.
Step 1: Install wtype
wtype sends synthetic keyboard input on Wayland. Run the install in the background using &.
sudo apt update && sudo apt install -y wtype &
Confirm the install.
command -v wtype && echo "wtype is ready"
Step 2: Add the keybind to rc.xml
This command inserts the keybind right after the opening <keyboard> tag. The -i.bak flag saves a backup at rc.xml.bak so you can revert.
sed -i.bak '/<keyboard>/a\ <keybind key="A-W-h">\n <action name="HideCursor" />\n <action name="WarpCursor" x="-1" y="-1" />\n </keybind>' ~/.config/labwc/rc.xml
The resulting keybind in ~/.config/labwc/rc.xml is:
<keybind key="A-W-h">
<action name="HideCursor" />
<action name="WarpCursor" x="-1" y="-1" />
</keybind>
HideCursor hides the pointer and WarpCursor moves it to -1,-1 (off screen) so it does not flash on the edge of the display.
Step 3: Trigger it at startup
Add the wtype command as the first line of the autostart file so the keybind runs as soon as labwc starts.
sed -i.bak '1i\wtype -M alt -M logo h -m alt -m logo' ~/.config/labwc/autostart
Step 4: Apply the changes
Reload labwc without a full restart.
labwc --reconfigure
Test the keybind by pressing Alt + Super + H. On the next reboot, the cursor is hidden automatically.
HideCursorhides the cursor once. It is not a permanent toggle, and the cursor reappears as soon as any pointer, gesture or stylus input is detected. For a signage device with no input peripherals, the startup trigger is usually enough. If devices may reconnect during a long session, re-run thewtypecommand on those events to hide the cursor again.