Skip to content
  • Amos Kong's avatar
    qapi: convert sendkey · e4c8f004
    Amos Kong authored
    
    
    Convert 'sendkey' to use QAPI.
    
    QAPI passes key's index of mapping table to qmp_send_key(),
    not keycode. So we use help functions to convert key/code to
    index of key_defs, and 'index' will be converted to 'keycode'
    inside qmp_send_key().
    
    For qmp, QAPI would check invalid key and raise error.
    For hmp, invalid key is checked in hmp_send_key().
    
    'send-key' of QMP doesn't support key in hexadecimal format.
    
    Signed-off-by: default avatarAmos Kong <akong@redhat.com>
    Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
    e4c8f004