Mir
key_input_event.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Robert Carr <robert.carr@canonical.com>
17  */
18 
19 #ifndef MIR_TOOLKIT_KEY_INPUT_EVENT_H_
20 #define MIR_TOOLKIT_KEY_INPUT_EVENT_H_
21 
22 #include <xkbcommon/xkbcommon.h>
23 
24 #ifdef __cplusplus
25 
29 extern "C" {
30 #endif
31 
36 
40 typedef enum {
41  /* A key has gone down */
43  /* A key has come up */
45  /* System policy has triggered a key repeat on a key
46  which was already down */
49 
57 
65 xkb_keysym_t mir_key_input_event_get_key_code(MirKeyInputEvent const* event);
66 
75 
83 
84 #ifdef __cplusplus
85 }
87 #endif
88 
89 #endif /* MIR_TOOLKIT_KEY_INPUT_EVENT_H_ */
Definition: key_input_event.h:42
MirKeyInputEventAction
Possible actions for changing key state.
Definition: key_input_event.h:40
struct MirKeyInputEvent MirKeyInputEvent
An event type describing a change in keyboard state.
Definition: key_input_event.h:35
xkb_keysym_t mir_key_input_event_get_key_code(MirKeyInputEvent const *event)
Retrieve the xkb mapped keycode associated with the key acted on.
Definition: input_event.cpp:231
int mir_key_input_event_get_scan_code(MirKeyInputEvent const *event)
Retrieve the raw hardware scan code associated with the key acted on.
Definition: input_event.cpp:237
unsigned int MirInputEventModifiers
Definition: input_event.h:65
MirKeyInputEventAction mir_key_input_event_get_action(MirKeyInputEvent const *event)
Retrieve the action which triggered a given key event.
Definition: input_event.cpp:210
Definition: key_input_event.h:47
MirInputEventModifiers mir_key_input_event_get_modifiers(MirKeyInputEvent const *event)
Retrieve the modifier keys pressed when the key action occured.
Definition: input_event.cpp:291
Definition: key_input_event.h:44

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015