<div dir="ltr">You must remember the key down... or up... are Xwindows event sent to window managers and X window clients. How X windows generates or keeps track of these is up to how it reads what comes from the keyboard driver.  The Keyboard driver itself is NOT directly involved, except maybe whether it implements key repeat, or the X window server implements key repeat (or even the client)<div><br></div><div>It also tracks the 'state' of modifier keys, such as shift, ctrl, alt, numlock, super (windows), which his also passed to the client as a state. some clients will treat a numlock key very differently to the key without numlock.  But that is up to the client.   Especially with regards to the Super modifier .   Something I know due to my DIY programming of keyboard macros (from the window manager) using Super-Function-Keys.</div><div><br></div><div>Similarly whether a client acts on the key on a 'down' press, or a 'up' press is also up to it.  Most client program act on the down press only which is why if you press 'a' an "a" appears on screen even before you released the key.  similar pressing 'a' and holding it, before pressing 'b' still shows up both "a" and "b" on screen, ignoring the 'up' events of those keys. Typically the only programs that care a lot about 'up' events are drawing or game programs.</div><div><br></div><div>NOTE: mouse keys are just another event, which also have up and down states.</div><div><br></div><div>You can see the events using the program "xev"</div><div><br></div><div>See  X Windows Event handling & Keyboard Macros</div><div><a href="http://www.ict.griffith.edu.au/anthony/info/X/event_handling.txt">http://www.ict.griffith.edu.au/anthony/info/X/event_handling.txt</a></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 7, 2017 at 1:14 AM, Mathias Dufresne <span dir="ltr"><<a href="mailto:mathias.dufresne@gmail.com" target="_blank">mathias.dufresne@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Regarding key-up and key-down behavior I believe that just not possible under Linux because there is no such states about keyboard's keys. In Linux a key is unpressed or pressed, a key is repeated not by the software currently having the focus but by keyboard's driver which starts repeating the key after some time.<br><br></div>I really wish to be mistaken about that...<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-15 13:22 GMT+01:00 Martin Jiřička <span dir="ltr"><<a href="mailto:mjiricka@gmail.com" target="_blank">mjiricka@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you Mikael. This moves all windows in current desktop to the last desktop:<br>
<br>
  <keybind key="W-C-S-j"><br>
<span>    <action name="ForEach"><br>
      <omnipresent>no</omnipresent><br>
      <then><br>
</span>        <action name="if"><br>
<span>          <desktop>current</desktop><br>
          <then><br>
            <action name="SendToDesktop"><br>
              <to>last</to><br>
              <follow>no</follow><br>
            </action><br>
          </then><br>
</span>        </action><br>
      </then><br>
    </action><br>
  </keybind><br>
<br>
Different approach, but it is usable. And better suited for swapping<br>
which did not even came to my mind.<br>
<br>
Anyway I was looking into source code to see how hard would be to<br>
implement MoveDesktop action. I did not give it enough time but am I<br>
right that biggest problem would be to remember all windows in<br>
selection? It looks like every action is triggered by one key and not<br>
like "key down: select windows, some actions, key up: release the<br>
selection".<br>
<div class="m_3436162962215611486HOEnZb"><div class="m_3436162962215611486h5">______________________________<wbr>_________________<br>
openbox mailing list<br>
<a href="mailto:openbox@icculus.org" target="_blank">openbox@icculus.org</a><br>
<a href="http://icculus.org/mailman/listinfo/openbox" rel="noreferrer" target="_blank">http://icculus.org/mailman/lis<wbr>tinfo/openbox</a></div></div></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
openbox mailing list<br>
<a href="mailto:openbox@icculus.org">openbox@icculus.org</a><br>
<a href="http://icculus.org/mailman/listinfo/openbox" rel="noreferrer" target="_blank">http://icculus.org/mailman/<wbr>listinfo/openbox</a><br></blockquote></div><br></div>