Mir
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
include
common
mir_toolkit
events
input
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
35
typedef
struct
MirKeyInputEvent
MirKeyInputEvent
;
36
40
typedef
enum
{
41
/* A key has gone down */
42
mir_key_input_event_action_up
,
43
/* A key has come up */
44
mir_key_input_event_action_down
,
45
/* System policy has triggered a key repeat on a key
46
which was already down */
47
mir_key_input_event_action_repeat
48
}
MirKeyInputEventAction
;
49
56
MirKeyInputEventAction
mir_key_input_event_get_action
(
MirKeyInputEvent
const
* event);
57
65
xkb_keysym_t
mir_key_input_event_get_key_code
(
MirKeyInputEvent
const
* event);
66
74
int
mir_key_input_event_get_scan_code
(
MirKeyInputEvent
const
* event);
75
82
MirInputEventModifiers
mir_key_input_event_get_modifiers
(
MirKeyInputEvent
const
* event);
83
84
#ifdef __cplusplus
85
}
87
#endif
88
89
#endif
/* MIR_TOOLKIT_KEY_INPUT_EVENT_H_ */
mir_key_input_event_action_up
Definition:
key_input_event.h:42
MirKeyInputEventAction
MirKeyInputEventAction
Possible actions for changing key state.
Definition:
key_input_event.h:40
MirKeyInputEvent
struct MirKeyInputEvent MirKeyInputEvent
An event type describing a change in keyboard state.
Definition:
key_input_event.h:35
mir_key_input_event_get_key_code
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
mir_key_input_event_get_scan_code
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
MirInputEventModifiers
unsigned int MirInputEventModifiers
Definition:
input_event.h:65
mir_key_input_event_get_action
MirKeyInputEventAction mir_key_input_event_get_action(MirKeyInputEvent const *event)
Retrieve the action which triggered a given key event.
Definition:
input_event.cpp:210
mir_key_input_event_action_repeat
Definition:
key_input_event.h:47
mir_key_input_event_get_modifiers
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
mir_key_input_event_action_down
Definition:
key_input_event.h:44
Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015