wtype icon indicating copy to clipboard operation
wtype copied to clipboard

wtype fails to release modifiers on exit

Open richardquint opened this issue 7 months ago • 0 comments

wtype fails to release modifiers on exit

I'm having a little problem with wtype in bash scripts on a Raspberry Pi 4 running the latest version of RaspiOS (Bookworm) fully updated, including having enabled labwc.

I have the configuration file ~/.config/labwc/rc.xml

<labwc_config>

   <desktops>
    <popupTime>1000</popupTime>
    <names>
      <name>Desktop 1</name>
      <name>Desktop 2</name>
      <name>Desktop 3</name>
      <name>Desktop 4</name>
    </names>
  </desktops>

  <keyboard>
    <keybind key="C-W-Left">
      <action name="GoToDesktop" to="left" />
    </keybind>
    <keybind key="C-W-Right">
      <action name="GoToDesktop" to="right" />
    </keybind>
	
    .
    .
    .


  </keyboard>

</labwc_config>

I'd prefer to use the mouse rather than keystrokes to switch desktops (I miss the workspace indicator extension I use on Ubuntu). I've created a series of scripts using wtype that I saved as executable files, created desktop files for them in ~/.local/share.applications which were then added to the Launcher on the Taskbar. For example instead of using CTL+WIN+right on the keyboard I'd click on the Laucher icon for GoToDesktopRight where the script is

#!/bin/bash
wtype -M ctrl -M win -P right -p right -s 1000 -m ctrl -m win

This works as I want. However, my first attempt at a script was simply

#!/bin/bash
wtype -M ctrl -M win -P right

which changed the Desktop, but the little popup showing which Desktop you're on doesn't go away after the 1 second interval as set for the popup time in rc.xml. It stays on top until I either switch to another Desktop using the keyboard or press and release any of the modifier keys. e.g. CTL, ALT, SHIFT etc. Adding "-p right -s 1000 -m ctrl -m win" works as I had intended, but the wtype README.md says "when wtype terminates, all the pressed keys/modifiers get released." Shouldn't this mean I don't have to explicitly release them before wtype is finished?

richardquint avatar Jun 10 '25 17:06 richardquint