summaryrefslogtreecommitdiff
path: root/README
blob: 71a89d614c01aa5696511a5c598324bf0aae5415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
This program is supposed to replay tests made with Spice but probably can be
used for many programs.

Mainly it records any mouse and keyboard and some images under the mouse from
a window to a file.
Then you can twick the recording to associate images for instance with clicks.
Then you can reproduce the recording.

Implementation
--------------
Grab the key similar to xinput to get windows child.
Get window needed, compute root child and handle only that events.
Record window position so to be able to replay to a different position.
PROBLEM: window should stay in same position (how to update position?)
Needs to pass some way to modify the positions for playback, something like
bound to lower side, one corner, shift, scale and so on (based on new window).
Use code from xwininfo to detect window size, get parent till is not root.
Record also windows movement, creation and so on?
Also we need to follow focus to understand we are sending input to our
window. Child on message are only related to mouse, not keyboard.

Ways to grab mouse/keys:
- xtest
- xinput
- record

Ways to inject mouse/keys:
- xtest
- sending events to windows (see xdotool source)
  XSendEvent
- injecting events directly (like xscope)
- injecting code to do the same as xscope does
- also we could use a separate X server

xdotool ?
xscope ?
xprop -id 0x5c00001|grep -i class  get window class
wmctrl xdotool
xev  can see windows close and move, just different events
xwd for example dumping part of screen/window

States (xmodmap)
- 01 shift
- 02 caps lock
- 04 control
- 08 alt
- 10 num lock
- 40 win left
- 80 alt gr
scroll lock, menu non modificatori
- 100-1000 mouse buttons