Check-in [9e38c1fca9]
Not logged in
Overview
Comment:Make sendkey command send several keys at once. Updated list of keys in the documentation mentioned all alphanumeric keys
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9e38c1fca98e4bce2de66a33ada7d5006c4c292d
User & Date: vitus on 2019-10-04 08:37:37
Other Links: manifest | tags
Context
2019-10-04
09:26
Documented snapshot-related subcommands Make vws snapshots work on running vms Improved a bit some help messages check-in: 95a3d4e3ed user: vitus tags: trunk
08:37
Make sendkey command send several keys at once. Updated list of keys in the documentation mentioned all alphanumeric keys check-in: 9e38c1fca9 user: vitus tags: trunk
07:39
Fixed parsing of device list in cdrom command check-in: 416aa92d0a user: vitus tags: trunk
Changes

Modified vws from [73ceee4773] to [750dc8fdb8].

544
545
546
547
548
549
550



551

552
553
554
555
556
557
558
544
545
546
547
548
549
550
551
552
553

554
555
556
557
558
559
560
561







+
+
+
-
+







        print("No sound recording in progress", file=sys.stderr)
        sys.exit(1)
    else:
        print(send_command(options.sock, "stopcapture " + match.group(1)))

def cmd_sendkey(options):
    """ vws sendkey """
    for keyspec in options.keyspec:
        if keyspec == " ":
            keyspec="spc"
    print(send_command(options.sock, "sendkey " + options.keyspec))
        print(send_command(options.sock, "sendkey " + keyspec))

def cmd_version(_):
    """ vws cersion """
    print(VERSION)


def cmd_snapshot(options):
1018
1019
1020
1021
1022
1023
1024
1025


1026
1027
1028
1029
1030
1031
1032
1021
1022
1023
1024
1025
1026
1027

1028
1029
1030
1031
1032
1033
1034
1035
1036







-
+
+







    # Screenshoits and recording
    p = new_command(cmds, 'screenshot', help='take a screenshot')
    p.add_argument('filename', help='PPM image filename to write screenshot to')
    p = new_command(cmds, 'record', help='Record audio output from VM')
    p.add_argument('filename', help='wav file to record autdio to')
    new_command(cmds, 'stoprecord', help='stop recording audio')
    p = new_command(cmds, 'sendkey', help='Send a keystroke to VM')
    p.add_argument('keyspec', help='key specification like ctrl-alt-delete')
    p.add_argument('keyspec', help='key specification like ctrl-alt-delete',
                   nargs='+')
    # Create new VM
    p = new_command(cmds, 'create', help="Create new VW")
    p.add_argument("--no-usb", help="Disable USB controller", action='store_const',
                   const=False, default=True, dest="usb")
    p.add_argument("--size", metavar='size', help="Size of primary disk images",
                   dest="size", default=config.get('create options', 'size'))
    p.add_argument("--arch", metavar='cputype', help="Emulated architecture",

Modified vws.mkd from [423c253021] to [3ea09a860d].

46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
46
47
48
49
50
51
52

53
54
55
56
57
58
59
60







-
+








**vws screenshot** *name* *filename.ppm*

**vws record** *name* *filename.wav*

**vws stoprecord**  *name*

**vws sendkey** *name* *keyspec*
**vws sendkey** *name* *keyspec*...

**vws monitor** *name*

**vws spiceuri** *name*

**vws version** 

365
366
367
368
369
370
371
372

373
374
375
376
377
378
379
380




381
382




383
384
385
386
387
388

389
390


391
392
393
394
395




396
397

398
399

400
401

402
403
404
405
406
407
408
365
366
367
368
369
370
371

372
373
374
375
376
377
378
379

380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396


397
398





399
400
401
402


403
404

405
406
407
408
409
410
411
412
413
414
415







-
+







-
+
+
+
+


+
+
+
+






+
-
-
+
+
-
-
-
-
-
+
+
+
+
-
-
+

-
+


+







Lists available virtual machines. If **--state** option is given, prints
out state (running or stopped) type (private or shared) spice URI (if
machine is running), mac and IP address. Pattern is shell-style wildcard 
which limits machines to be shown. Don't forget to quote pattern from shell. It
should be expanded. **--usb** option lists USB devices connected to the
virtual machine using **vws usb** command.

**vws sendkey** *machine* *keyspec*
**vws sendkey** *machine* *keyspec*...

Allows to send some key combination to the virtual machine. For example
if windows screen is locked spice client is sometimes unable to deliver
key stroke to the virtual machine in order to get it out of sleep. 

In this case **vws sendkey** *machine* **ctrl-alt-delete** helps.

One **vws sendkey** command sends only one key combination
Each key combination should be passed to  **vws sendkey** as separate
argument. Not all ascii characters can be specified as arguments.
I.e. it is not possible to determine whether colon should be
send as shift-;

See **KEY SPECS** below about format of key specification.

Keys send via this command are subject of guest keyboard mapping.
So, you can switch keyboard layout by sending switching key sequence
and then send text on non-latin language.

KEY SPECS
=========

Following key names are avalable:

```
shift shift_r alti alt_r altgr altgr_r ctrl ctrl_r menu

shift shift_r alt alt_r altgr altgr_r ctrl ctrl_r menu
esc	 f1  f2  f3 f4  f5  f6  f7  f8  f9 f10 f11 f12
esc	1 2 3 4 5 6 7 8
9 0 minus  equal backspace  tab
q w e r t y u i o p ret 
a s d f  g  h  j k l
z  x  c  v b n m  comma  dot  slash
grave_accent 1 2 3 4 5 6 7 8 9 0 minus  equal backslash backspace 
tab q w e r t y u i o p bracket_left bracket_right_ret 
a s d f g  h  j k l semicolon apostrophe
z  x  c v b n m  comma  dot  slash
asterisk  spc  caps_lock  f1  f2  f3 f4  f5  f6  f7  f8  f9
f10  num_lock  scroll_lock  kp_divide  kp_multiply
asterisk  spc  caps_lock num_lock  scroll_lock  kp_divide  kp_multiply
kp_subtract kp_add  kp_enter  kp_decimal  sysrq  kp_0  kp_1
kp_2  kp_3  kp_4  kp_5  kp_6  kp_7 kp_8  kp_9  <  f11  f12  
kp_2  kp_3  kp_4  kp_5  kp_6  kp_7 kp_8  kp_9  less   
print home  pgup  pgdn  end  left  up
down  right  insert  delete
```

Several key names can be joined together with '-' sign to form key with
modificators sequence.

CONFIGURATION FILE
==================