1@chapter File types and format
2
3The files used by Xnee are
4@itemize @bullet
5@item  Xnee Project File
6@item  Xnee Session File
7@end itemize
8These files must follow the Xnee File Format.
9
10@section Project file
11@cindex  Project file
12Xnee can be set either using command line options (when using xnee) or by
13clicking the correct buttons etc in the GUI (using gnee). Instead of setting
14the same settings over and over again, you can use the Xnee Project File.
15
16
17@subsection  Create a project file
18@cindex      Create a project file
19You can create a project by yourself. This can be done using
20the @code{write-settings} option in cnee or the ``save settings to file''
21when using gnee or you can use the Xnee GUI (gnee) to write one.
22You can also write one by yourself in your favorite editor.  Just make sure you
23follow the Xnee format. For information and specification on this format read
24the Xnee format chapter.
25@
26
27The authors of Xnee suggests you start off with a generated project file. To get one
28such file, type the following
29@code{cnee --mouse --keyboard --write-settings new_proj.xnp}. You will now
30have a file @code{new_proj.xnp} with some useful values, which you can edit as you wish.
31@
32
33To use this file to record, simply type
34@code{cnee --record --project new_proj.xnp}
35
36
37@section Xnee Session file
38@cindex  Session file
39The Xnee session files are the printouts from a recorded session
40following the Xnee File Format. For information and specification on
41this format read the Xnee File Format chapter.
42
43
44
45@section Xnee file format
46The Xnee Format is divided into different directives.
47The format is line based, meaning that
48
49@itemize @bullet
50@item  there is one directive per line
51@item  one line contains one (and only one) directive
52@end itemize
53These directives are definied as follows.
54
55@section Xnee directives
56The following directives are used in Xnee:
57@multitable  @columnfractions .0 .30 .70
58@item
59@tab @b{Directives}
60@tab @b{Description}
61
62@item
63@tab Comment
64@tab This is used to comment the various files
65
66@item
67@tab Project
68@tab These contains information about the session- or project file
69
70@item
71@tab Settings
72@tab Data used when recording and replaying
73
74@item
75@tab Replay data
76@tab Recorded replayable data (used when replaying)
77
78@item
79@tab Script replay data
80@tab Scriptable primitives
81
82@item
83@tab Mark
84@tab Lines inserted in the seesion file when a modifier+key was pressed
85
86@item
87@tab Execution
88@tab Lines that trigger the execution of an external program
89
90@item
91@tab  Project information
92@tab  Project
93
94@end multitable
95
96
97
98@subsection Comment
99@cindex  Comment directives
100
101
102@multitable  @columnfractions .0 .20 .50 .30
103@item
104@tab @b{First token}
105@tab @b{Interpretation}
106
107@item
108@tab  #
109@tab  The whole line is ignored.
110@end multitable
111As long as the first token is @code{#} the whole line is intrepreted as a comment, just
112as in bash.
113
114
115@subsection Settings
116@cindex Settings
117
118@multitable @columnfractions .45 .15 .6
119@item
120
121@b{Settings directive}
122@tab @b{Argument}
123@tab @b{Interpretation}
124
125@item
126data-to-record
127@tab  integer
128@tab  Limits the number of data to record to to the integer value
129
130@item
131events-to-record
132@tab  integer
133@tab  Limits the number of events to record to to the integer value
134
135@item
136time-to-record
137@tab  integer
138@tab  Limits the number of seconds to record to to the integer value
139
140@item
141display
142@tab  string
143@tab  Sets the display to record or replay to the string
144
145@item
146distribute
147@tab  string
148@tab  Distribute all recorded or replayed replayable events to the display given by the string
149
150@item
151file
152@tab  string
153@tab  Read replay data from the file given by the string
154
155@item
156out-file
157@tab  string
158@tab  Print recorded data to the file given by the string
159
160@item
161plugin
162@tab  string
163@tab  Use the plugin given by the string
164
165@item
166first-last
167@tab  boolean
168@tab  Print only first and last of successive MotionNotify events
169
170@item
171verbose
172@tab  boolean
173@tab  Use verbose debugging printout
174
175@item
176buffer-verbose
177@tab  boolean
178@tab  Use verbose buffer verbose printouts (not built by default)
179
180@item
181time
182@tab  integer
183@tab  Delay the start of the Xnee action
184
185@item
186all-clients
187@tab  boolean
188@tab  Record all curret and future clients (default)
189
190@item
191future-clients
192@tab  boolean
193@tab  Record only future clients
194
195@item
196human-printout
197@tab  boolean
198@tab  Prints the recorded data in a (quite) more ser friendly format
199
200@item
201sync-mode
202@tab  boolean
203@tab  Sets recording mode
204
205@item
206speed-percent
207@tab  integer
208@tab  Sets the replaying speed percentage to the integer value
209
210@item
211stop-key
212@tab  @acronym{string}
213@tab  Sets the stop key combination to the string
214
215@item
216pause-key
217@tab  @acronym{string}
218@tab  Sets the pause key combination to the string
219
220@item
221resume-key
222@tab  @acronym{string}
223@tab  Sets the resume key combination to the string
224
225@item
226mark-key
227@tab  @acronym{string}
228@tab  Sets the mark key combination to the string
229
230@item
231exec-key
232@tab  @acronym{string}
233@tab  Sets the execute key combination to string
234
235@item
236replay-resolution
237@tab  string
238@tab  Sets the replay resolution to the string
239
240@item
241replay-resolution
242@tab  string
243@tab  Sets the replay resolution to the string
244
245@item
246recall-window-position
247@tab
248@tab  Use window position recall during replay
249
250@item
251resolution-adjustment
252@tab  boolean
253@tab  Use resolution adjustment, even if the recored resolution differs from the one to replay to
254
255@item
256event-range
257@tab  range
258@tab  Sets the events to record
259
260@item
261error-range
262@tab  range
263@tab  Sets the errors to record to range*
264
265@item
266request-range
267@tab  range
268@tab  Sets the request to record to range*
269
270@item
271reply-range
272@tab  range
273@tab  Sets the replies to record to range*
274
275@item
276extension-request-major-range
277@tab  range
278@tab  Sets the extension requests (major) to record to range*
279
280@item
281extension-request-minor-range
282@tab  range
283@tab  Sets the extension requests (minor) to record to range*
284
285@item
286extension-reply-major-range
287@tab  range
288@tab  Sets the extension replies (major) to record to range*
289
290@item
291extension-reply-minor-range
292@tab  range
293@tab  Sets the extension replies (minor) to record to range*
294
295@item
296force-replay
297@tab  boolean
298@tab  Continue to replay even if Xnee is out of sync
299
300@item
301max-threshold
302@tab  integer
303@tab  Sets the maximum synchronisation threshold
304
305@item
306min-threshold
307@tab  integer
308@tab  Sets the minimum synchronisation threshold
309
310@item
311total-threshold
312@tab  integer
313@tab  Sets the total maximum synchronisation threshold
314
315@item
316events-to-record
317@tab  integer
318@tab  Sets the number of events to record
319
320@item
321data-to-record
322@tab  integer
323@tab  Sets the number of data to record
324
325@item
326time-to-record
327@tab  integer
328@tab  Sets the number of seconds to record
329
330@item
331store-mouse-position
332@tab
333@tab  If set, Xnee records the initial mouse position and makes sure that replaying starts from there
334
335@item
336retype-press-delay
337@tab  integer
338@tab  Xnee delays processing after a faked key press (during retype)
339with integer milli seconds
340
341@item
342retype-release-delay
343@tab  integer
344@tab  Xnee delays processing after a faked key press (during retype)
345with integer milli seconds
346
347@end multitable
348
349@cindex Xnee Settings Arguments
350
351@multitable @columnfractions .30 .40 .30
352@item @b{Settings argument}
353@tab @b{Description}
354@tab @b{Example}
355
356@item
357@code{integer}
358@tab  is an integer value.
359@tab  1
360
361@item
362@code{string}
363@tab  is a string.
364@tab  localhost
365
366@item
367@code{boolean}
368@tab  is a boolean value given by true/1 or false/0
369@tab  true, false, 0, 1
370
371@item
372@code{subrange}
373@tab  Subrange is gives a range of data by specifying a start and stop
374      data. In the case of one data the stop data can be omitted.
375@tab  2-5 or MapNotify
376
377@item
378@code{range}
379@tab Ranges are a comma separated list of subranges.
380@tab 2-3,MotionNotify-MapNotify,GravityNotify,PropertyNotify,30
381
382
383@end multitable
384
385
386
387@subsection Replay
388@cindex Replay directive
389@multitable  @columnfractions .40 .60
390@item
391@b{Replay directive}
392@tab @b{Interpretation}
393
394@item
3950,0
396@tab not valid
397
398@item
3990,1
400@tab not valid
401
402@item
4030,2,void,void,void,keycode,screen,time
404@tab KeyPress on key with keycode, used to replay
405
406@item
4070,3,void,void,void,keycode,screen,time
408@tab KeyRelease on key with keycode, used to replay
409
410@item
4110,4,void,void,button nr,void,screen,time
412@tab ButtonPress on button nr, used to replay
413
414@item
4150,5,void,void,button nr,void,screen,time
416@tab ButtonRelease on button nr, used to replay
417
418@item
4190,6,x,y,void,void,screen,time
420@tab MotionNotify on poistion (x,y), used to replay
421
422@item
4231,request number, request type, length, request id, time
424@tab Recorded request, used during synchronisation
425
426@item
4272,reply number,time
428@tab Recorded reply, used during synchronisation
429
430@item
4313,error number,time
432@tab Recorded error, used during synchronisation
433
434@item
4356,EB+2,void,void,void,keycode,screen,time
436@tab X Input (master) KeyPress on key with keycode, used to replay
437
438@item
4396,EB+3,void,void,void,keycode,screen,time
440@tab X Input (master) KeyRelease on key with keycode, used to replay
441
442@item
4436,EB+4,void,void,button nr,void,screen,time
444@tab X Input (master) ButtonPress on button nr, used to replay
445
446@item
4476,EB+5,void,void,button nr,void,screen,time
448@tab X Input (master) ButtonRelease on button nr, used to replay
449
450@item
4516,EB+6,x,y,void,void,screen,time
452@tab X Input (master) MotionNotify on poistion (x,y), used to replay
453
454@item
4556,EB+2,void,void,void,keycode,screen,time
456@tab X Input (slave) KeyPress on key with keycode, used to replay
457
458@item
4596,EB+3,void,void,void,keycode,screen,time
460@tab X Input (slave) KeyRelease on key with keycode, used to replay
461
462@item
4636,EB+4,void,void,button nr,void,screen,time
464@tab X Input (slave) ButtonPress on button nr, used to replay
465
466@item
4676,EB+5,void,void,button nr,void,screen,time
468@tab X Input (slave) ButtonRelease on button nr, used to replay
469
470@item
4716,EB+6,x,y,void,void,screen,time
472@tab X Input (slave) MotionNotify on poistion (x,y), used to replay
473
474@end multitable
475time is the time on the server the data was to the recording Xnee
476client. This time is used to keep the speed intact during replay.
477
478@subsection Script replay data
479@cindex   Script replay data
480
481@multitable  @columnfractions .40 .60
482@item
483@b{Primitive}
484@tab @b{Interpretation}
485
486@item
487fake-motion
488@tab Fakes a mouse motion
489
490@item
491fake-button-press
492@tab Fakes a button press
493
494@item
495fake-button-release
496@tab Fakes a button release
497
498@item
499fake-button
500@tab Fakes a button press and release
501
502@item
503fake-key-press
504@tab Fakes a key press
505
506@item
507fake-key-release
508@tab Fakes a key release
509
510@item
511fake-key
512@tab Fakes a key press and release
513
514@end multitable
515
516@multitable  @columnfractions .20  .20 .60
517@item
518@b{Primitive variable}
519@tab @b{Primitive values}
520@tab @b{Interpretation}
521
522@item
523x=value
524@tab  integer
525@tab  Sets the x position used in fake-motion to value
526
527@item
528x=value
529@tab  +integer
530@tab  Set the relative motion (x direction) used in fake-motion to value
531
532@item
533x=value
534@tab  -integer
535@tab  Set the relative motion (x direction) used in fake-motion to value
536
537@item
538y=value
539@tab  integer
540@tab  Sets the y position used in fake-motion to value
541
542@item
543y=value
544@tab  +integer
545@tab  Set the relative motion (y direction) used in fake-motion to value
546
547@item
548y=value
549@tab  -integer
550@tab  Set the relative motion (y direction) used in fake-motion to value
551
552@item
553button=value
554@tab  integer
555@tab  set the button to fake with fake-button-press, fake-button-release and fake-button to value
556
557@item
558key=value
559@tab  integer
560@tab  set the key to fake with fake-key-press, fake-key-release and fake-key to value
561
562@end multitable
563
564
565@subsection Mark
566@cindex  Mark directive
567@multitable  @columnfractions .20 .20 .60
568@item
569@b{First tokens}
570@tab @b{Arguments}
571@tab @b{Interpretation}
572
573@item
574Mark
575@tab  time string
576@tab  Ignored. This feature is intended to let the user do whatever he/she
577      wants to. This will obviously lead to modifying the source code etc.
578@end multitable
579
580
581@subsection Exec
582@cindex  Exec directive
583@multitable  @columnfractions .20 .20 .60
584@item @b{First tokens}
585@tab @b{Arguments}
586@tab @b{Interpretation}
587
588@item
589Exec
590@tab  command string
591@tab  This is used during to replay to execute a given command. If no
592      command string is found Xnee will try to
593      read the command from the environment variable @code{XNEE_EXEC_COMMAND}
594@end multitable
595
596
597@subsection Project information
598@cindex  Project information directive
599@multitable  @columnfractions .45 .55
600@item @b{Project information directives}
601@tab @b{Arguments}
602
603@item
604ProjectName
605@tab  string s is the project name
606
607@item
608ProjectDescription
609@tab  string s is the project description
610
611@item
612ProjectCreationDate
613@tab  string s is the project creation date
614
615@item
616ProjectCreationProgram
617@tab  string s is the name of the program that create the project file
618
619@item
620ProjectCreationProgVersion
621@tab  string s is the version of the program that create the project file
622
623@item
624ProjectLastChangeDate
625@tab  string s is the date of the last change of the project file
626
627@item
628ProjectLastChangeProgram
629@tab  string s is the name of the program that last changed of the project file
630
631@item
632ProjectLastChangeVersion
633@tab  string s is the version of the program that last changed of the project file
634
635@item
636ProjectCurrentChangeDate
637@tab  string s is the date of the current change of the project file
638
639@item
640ProjectCurrentChangeProgram
641@tab  string s is the name of the program that current changed of the project file
642
643@item
644ProjectCurrentChangeVersion
645@tab  string s is the version of the program that current changed of the project file
646
647
648@end multitable
649