summaryrefslogtreecommitdiffstats
path: root/ui/input.c
Commit message (Collapse)AuthorAgeFilesLines
* add input-send-event commandMarcelo Tosatti2014-10-021-0/+37
| | | | | | | | | | | Which allows specification of absolute/relative, up/down and console parameters. Suggested by Gerd Hoffman. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: add support for kbd delaysGerd Hoffmann2014-06-041-3/+105
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: bind devices and input routingGerd Hoffmann2014-05-261-3/+40
| | | | | | | | Add function to bind input devices to display devices. Implementing input routing on top of this: Events coming from the display device in question are routed to the input device bound to it (if there is one). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: add name to input_event_key_numberGerd Hoffmann2014-05-261-2/+4
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: add qemu_input_handler_deactivateGerd Hoffmann2014-05-161-0/+7
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: add sanity checkGerd Hoffmann2014-04-011-0/+3
| | | | | | Check we've actually found a input handler before trying to call it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: mouse_set should check input device type.Hani Benhabiles2014-04-011-5/+11
| | | | | | | | | | | | | | | | | | Otherwise, the index of an input device like a usb-kbd is silently accepted. (qemu) info mice Mouse #2: QEMU PS/2 Mouse * Mouse #3: QEMU HID Mouse (qemu) mouse_set 1 (qemu) info mice Mouse #2: QEMU PS/2 Mouse * Mouse #3: QEMU HID Mouse Also replace monitor_printf() call in do_mouse_set() with error_report() and adjust error message. Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: move do_mouse_set to new coreGerd Hoffmann2014-03-051-0/+21
| | | | | | | This removes the last user of the lecagy input mouse handler list, so we can remove more legacy bits with this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: move qmp_query_mice to new coreGerd Hoffmann2014-03-051-0/+29
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: add input_mouse_mode tracepointGerd Hoffmann2014-03-051-0/+1
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: move mouse mode notifier to new coreGerd Hoffmann2014-03-051-0/+30
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: trace eventsGerd Hoffmann2014-03-051-0/+48
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: mouse: add qemu_input_is_absolute()Gerd Hoffmann2014-03-051-0/+8
| | | | | | Same as kbd_mouse_is_absolute(), but using new input core. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: mouse: add graphic_rotate supportGerd Hoffmann2014-03-051-0/+31
| | | | | | | | | | Transform absolute mouse events according to graphic_rotate. Legacy input code does it for both absolute and relative events, but the logic is broken for relative coordinates, so this is most likely not used anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: mouse: add helpers functions to coreGerd Hoffmann2014-03-051-0/+71
| | | | | | | Likewise a bunch of helper functions to manage mouse button and movement events, again to make life easier for the ui code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: keyboard: add helper functions to coreGerd Hoffmann2014-03-051-0/+35
| | | | | | | | A bunch of helper functions to manage keyboard events, to make life simpler for the ui code when submitting keyboard events. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: add core bits of the new input layerGerd Hoffmann2014-03-051-0/+83
| | | | | | | Register and unregister handlers. Event dispatcher code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: rename file to legacyGerd Hoffmann2014-03-051-559/+0
| | | | | | | Rename ui/input.c to ui/input-legacy.c. We are going to replace it step by step. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Don't crash on keyboard input with no handlerDon Koch2013-12-021-1/+1
| | | | | | | | | | Prevent a call to put_kbd if null. On shutdown of some OSes, the keyboard handler goes away before the system is down. If a key is typed during this window, qemu crashes. Signed-off-by: Don Koch <dkoch@verizon.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* aio / timers: Switch entire codebase to the new timer APIAlex Bligh2013-08-221-3/+3
| | | | | | | | | | | This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* ui/input.c: replace magic numbers with macrosAmos Kong2013-05-231-6/+7
| | | | | | | | It's clearer to use defined macros than magic numbers. Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Lei Li <lilei@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* input: introduce keyboard handler listGerd Hoffmann2013-04-241-12/+25
| | | | | | | | | | | | | | | Add a linked list of keyboard handlers. Added handlers will go to the head of the list. Removed handlers will be zapped from the list. The head of the list will be used for events. This fixes the keyboard-dead-after-usb-kbd-unplug issue, key events will be re-routed to the ps/2 kbd instead of being discarded. [ v2: fix cut+paste bug found my Markus ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1366798118-3248-3-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* input: make QEMUPutLEDEntry + QEMUPutMouseEntry privateGerd Hoffmann2013-04-241-0/+18
| | | | | | | | | | There is no need for anybody outside ui/input.c to access the struct elements. Move the definitions, leaving only the typedefs in the header files. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1366798118-3248-2-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: fix the wrong order of releasing keysAmos Kong2013-04-191-5/+3
| | | | | | | | | | | | | (qemu) sendkey ctrl_r-scroll_lock-scroll_lock Executing this command could not let Windows guest panic, it caused by the wrong order of releasing keys. This problem was introduced by commit e4c8f004c55d9da3eae3e14df740238bf805b5d6. The right release order should be starting from last item. Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* error: Strip trailing '\n' from error string arguments (again)Markus Armbruster2013-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming back. Tracked down with this Coccinelle semantic patch: @r@ expression err, eno, cls, fmt; position p; @@ ( error_report(fmt, ...)@p | error_set(err, cls, fmt, ...)@p | error_set_errno(err, eno, cls, fmt, ...)@p | error_setg(err, fmt, ...)@p | error_setg_errno(err, eno, fmt, ...)@p ) @script:python@ fmt << r.fmt; p << r.p; @@ if "\\n" in str(fmt): print "%s:%s:%s:%s" % (p[0].file, p[0].line, p[0].column, fmt) Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1360354939-10994-4-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* softmmu: move include files to include/sysemu/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* monitor: move include files to include/monitor/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qapi: move include files to include/qobject/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* ui: move files to ui/ and include/ui/Paolo Bonzini2012-12-191-0/+529
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud