GINN(1)

πŸ“¦
version 0.2.6 Β· 2 versions
, in ubuntu jammy

✨ GINN(1) ✨

okay bestie, sit down, hydrate, and let me tell you about ginn from section 1 of the manual β€” it's the Gesture to Keypress / Mouse Button injector and honestly? it's giving genius. 🫢


🌸 NAME 🌸

ginn β€” Gesture to Keypress / Mouse Button injector. yes, that's the whole name, and yes, it slays.


πŸŽ€ SYNOPSIS πŸŽ€

ginn [<specific configuration file>]

πŸ’… DESCRIPTION πŸ’…

so basically, ginn is a program that lets you test gesture support in legacy applications without having to rewrite them from scratch β€” no cap. it does this by injecting keypresses or mouse buttons after it matches rules from the wishes.xml file. iconic behaviour, truly. πŸ’–

you define the matching rules by expressing wishes. each wish contains the name of the gesture, the number of fingers, and the matching rules. the keypress you want to inject is defined by the key tag, and the mouse button by button. oh and you can also add up to 4 modifier keys like Control_L. ✨

πŸ¦‹ EXAMPLES πŸ¦‹

sample wishes file, look at her:

<ginn>
<global>
  <wish gesture="Drag" fingers="2">
    <action name="action5" when="update">
      <trigger prop="delta y" min="20" max="80"/>
      <key>Down</key>
    </action>
  </wish>
</global>
<applications>
  <application name="inkscape">
    <wish gesture="Pinch" fingers="2">
      <action name="action1" when="update">
        <trigger prop="radius delta" min="-200" max="-40"/>
        <key>KP_Subtract</key>
      </action>
    </wish>
  </application>
</applications>
</ginn>

gesture type can be: Drag, Pinch, Rotate or Tap. πŸŒ€ the time of injection can be selected by using update to inject when the gesture is received, or finish to inject when the gesture is finished. that choice gets written inside the when in the action line:

<action name="action1" when="update">

now here's the tea: the Open Input Framework gesture stack provides gesture updates that can be very small, too small to reach the desired interval specified in the trigger. 😭 to provide more flexibility, a gesture accumulation is performed by default on the successive property values' updates for a desired gesture β€” it keeps accumulating until it reaches the min-max intervall or the gesture finishes, and then the accumlation buffer is reinitialized. if you want to disable this feature you can specify it explicitly:

<trigger prop="delta x" min="-80" max="-40" accumulate="false"/>

the attributes used in trigger can be obtained by running geistest β€” you can also refer to the list below, bestie, I got you. 🫢 you can use more than one trigger, but you need to use them in the same order as they appear in the list below. don't freestyle it. πŸ’€

Sub-list of general attributes:

 "device id"       = 13
 "timestamp"       = 180598198
 "root window id"  = 254
 "event window id" = 159825921
 "child window id" = 159825921
 "focus x"         = 0.000000
 "focus y"         = 0.000000
 "gesture name"    = "Drag"
 "touches"         = 1

Sub-list of attributes used with Drag gesture:

 "delta x"    = -8.933333
 "delta y"    = 22.000000
 "velocity x" = -0.638095
 "velocity y" = 1.571429
 "position x" = 634.533386
 "position y" = 482.777771

Sub-list of attributes used with Rotate gesture:

 "angle delta"      = -0.358113
 "angular velocity" = -0.029843
 "angle"            = -1.159999

Sub-list of attributes used with Pinch gesture:

 "radius delta"    = -44.935688
 "radial velocity" = -3.209692
 "radius"          = 180.466690

Sub-list of attributes used with Tap gesture:

 "tap time"   = 74.000000
 "position x" = 740.933350
 "position y" = 469.333344

Last attribues in the general list:

 "boundingbox x1" = 634.533386
 "boundingbox y1" = 482.777771
 "boundingbox x2" = 634.533386
 "boundingbox y2" = 482.777771
 "touch 0 id"     = 1079.000000
 "touch 0 x"      = 634.533386
 "touch 0 y"      = 482.777771

the names of keys list can be obtained after removing the XK_ prefix from the /usr/include/X11/keysymdef.h file. go get 'em. ⌨️✨

the mouse buttons are written with their corresponding number, and this list is lowkey essential:

  • 1 β€” Left Button
  • 2 β€” Middle Button
  • 3 β€” Right Button
  • 4 β€” Wheel Up
  • 5 β€” Wheel Down
  • 6 β€” Horizontal Wheel Left
  • 7 β€” Horizontal Wheel Right
  • 8 β€” "Back" in browsers

πŸ“ FILES πŸ“

  • /etc/ginn/wishes.xml β€” User customized wishes file.
  • /usr/share/ginn/wishes.xml β€” Basic ginn wishes file installed for reference.

🌈 SEE ALSO 🌈

  • geistest

πŸ‘‘ AUTHOR πŸ‘‘

Mohamed Ikbel Boulabiar <boulabiar@gmail.com>


Copyright 2010-2011 by Canonical, Ltd.


and that's the whole page, bestie β€” brought to you straight from the manual, source and date and all, courtesy of Canonical, Ltd. and that 2010-2011 copyright era. stay hydrated, go inject some gestures, periodt. πŸ’…πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from