diff --git a/doc/sphinx/how-to/how-to-handle-keyboard-input.md b/doc/sphinx/how-to/how-to-handle-keyboard-input.md index 3093f68c351..fe2336cecb7 100644 --- a/doc/sphinx/how-to/how-to-handle-keyboard-input.md +++ b/doc/sphinx/how-to/how-to-handle-keyboard-input.md @@ -79,7 +79,7 @@ This big block of code can be broken down into three parts: + case XKB_KEY_t: + case XKB_KEY_T: + external_client_launcher.launch({terminal_cmd}); -+ return false; ++ return true; + + // Do nothing + default: diff --git a/include/common/mir_toolkit/events/input/input_event.h b/include/common/mir_toolkit/events/input/input_event.h index 1347a2a84fb..b11e19a2fee 100644 --- a/include/common/mir_toolkit/events/input/input_event.h +++ b/include/common/mir_toolkit/events/input/input_event.h @@ -67,8 +67,8 @@ MirInputEventType mir_input_event_get_type(MirInputEvent const* event); * Retrieve the MirKeyboardEvent associated with a given input event. * * \param[in] event The input event - * \return The MirKeyboardEvent or NULL if event type is not - * mir_input_event_type_key + * \return The MirKeyboardEvent + * \pre The event type is mir_input_event_type_key */ MirKeyboardEvent const* mir_input_event_get_keyboard_event(MirInputEvent const* event); @@ -76,8 +76,8 @@ MirKeyboardEvent const* mir_input_event_get_keyboard_event(MirInputEvent const* * Retrieve the MirTouchEvent associated with a given input event. * * \param[in] event The input event - * \return The MirTouchEvent or NULL if event type is not - * mir_input_event_type_touch + * \return The MirTouchEvent + * \pre The event type is mir_input_event_type_touch */ MirTouchEvent const* mir_input_event_get_touch_event(MirInputEvent const* event); @@ -85,8 +85,8 @@ MirTouchEvent const* mir_input_event_get_touch_event(MirInputEvent const* event) * Retrieve the MirPointerEvent associated with a given input event. * * \param[in] event The input event - * \return The MirPointerEvent or NULL if event type is not - * mir_input_event_type_pointer + * \return The MirPointerEvent + * \pre The event type is mir_input_event_type_pointer */ MirPointerEvent const* mir_input_event_get_pointer_event(MirInputEvent const* event); diff --git a/include/miral/miral/toolkit_event.h b/include/miral/miral/toolkit_event.h index 6985b148c1f..826ca6cc2a8 100644 --- a/include/miral/miral/toolkit_event.h +++ b/include/miral/miral/toolkit_event.h @@ -86,8 +86,8 @@ MirInputEventType mir_input_event_get_type(MirInputEvent const* event); * Retrieve the MirKeyboardEvent associated with a given input event. * * \param[in] event The input event - * \return The MirKeyboardEvent or NULL if event type is not - * mir_input_event_type_key + * \return The MirKeyboardEvent + * \pre The event type is mir_input_event_type_key */ MirKeyboardEvent const* mir_input_event_get_keyboard_event(MirInputEvent const* event); @@ -95,8 +95,8 @@ MirKeyboardEvent const* mir_input_event_get_keyboard_event(MirInputEvent const* * Retrieve the MirTouchEvent associated with a given input event. * * \param[in] event The input event - * \return The MirTouchEvent or NULL if event type is not - * mir_input_event_type_touch + * \return The MirTouchEvent + * \pre The event type is mir_input_event_type_touch */ MirTouchEvent const* mir_input_event_get_touch_event(MirInputEvent const* event); @@ -104,8 +104,8 @@ MirTouchEvent const* mir_input_event_get_touch_event(MirInputEvent const* event) * Retrieve the MirPointerEvent associated with a given input event. * * \param[in] event The input event - * \return The MirPointerEvent or NULL if event type is not - * mir_input_event_type_pointer + * \return The MirPointerEvent + * \pre The event type is mir_input_event_type_pointer */ MirPointerEvent const* mir_input_event_get_pointer_event(MirInputEvent const* event);