summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-08-05 20:33:52 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-06 11:05:29 +0200
commit51c8ff8fc8b03e5676f7273beefbef2be0f3d24b (patch)
treeeaec4d20a3a6cc34be5c3dbbcf484758379e1f31
parentb6005cf160eebb24b393eb1e91269b8a0b1ed96f (diff)
docs: Improve Efl.Input.Key docs
People without X11 background would have a hard time understanding the difference between key, key_name, key_code, etc. Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Reviewed-by: YeongJong Lee <yj34.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D9487
-rw-r--r--src/lib/evas/canvas/efl_input_key.eo43
1 files changed, 32 insertions, 11 deletions
diff --git a/src/lib/evas/canvas/efl_input_key.eo b/src/lib/evas/canvas/efl_input_key.eo
index f75d2b1666..f38d943fdf 100644
--- a/src/lib/evas/canvas/efl_input_key.eo
+++ b/src/lib/evas/canvas/efl_input_key.eo
@@ -6,22 +6,37 @@ class Efl.Input.Key extends Efl.Object implements Efl.Input.Event, Efl.Input.Sta
6 @property pressed { 6 @property pressed {
7 [[$true if the key is down, $false if it is released.]] 7 [[$true if the key is down, $false if it is released.]]
8 values { 8 values {
9 val: bool; [[$true if the key is pressed, $false otherwise]] 9 val: bool; [[$true if the key is pressed, $false otherwise.]]
10 } 10 }
11 } 11 }
12 @property key_name { 12 @property key_name {
13 [[Name string of the key.]] 13 [[Name string of the physical key that produced this event.
14
15 This typically matches what is printed on the key. For example, "1"
16 or "a". Note that both "a" and "A" are obtained with the same
17 physical key, so both events will have the same @.key_name "a" but
18 different @.key_sym.
19
20 Commonly used in keyboard remapping menus to uniquely identify a
21 physical key.
22 ]]
14 values { 23 values {
15 val: string; [[Key name]] 24 val: string; [[Name of the key that produced this event.]]
16 } 25 }
17 } 26 }
18 @property key_sym { 27 @property key_sym {
19 [[Logical key. 28 [[Name of the symbol produced by this key event.
20 29
21 Eg. Shift + 1 = exclamation 30 For example, "a", "A", "1" or "exclam". The same physical key can
31 produce different symbols when combined with other keys like "shift"
32 or "alt gr". For example, "a" and "A" have different @.key_sym but
33 the same @.key_name "a".
34
35 This is the field you typically use to uniquely identify a keyboard
36 symbol, in keyboard shortcuts for example.
22 ]] 37 ]]
23 values { 38 values {
24 val: string; [[Logical key name]] 39 val: string; [[Symbol name produced by key event.]]
25 } 40 }
26 } 41 }
27 @property string { 42 @property string {
@@ -29,23 +44,29 @@ class Efl.Input.Key extends Efl.Object implements Efl.Input.Event, Efl.Input.Sta
29 added. 44 added.
30 ]] 45 ]]
31 values { 46 values {
32 val: string; [[Visible string from key press in UTF8]] 47 val: string; [[Visible string produced by this key event, in UTF8.]]
33 } 48 }
34 } 49 }
35 @property compose_string { 50 @property compose_string {
36 [[A UTF8 string if this keystroke has modified a string in the middle 51 [[A UTF8 string if this keystroke has modified a string in the middle
37 of being composed. 52 of being composed.
38 53
39 Note: This string replaces the previous one 54 Note: This string replaces the previous one.
40 ]] 55 ]]
41 values { 56 values {
42 val: string; [[Composed key string in UTF8]] 57 val: string; [[Composed string in UTF8.]]
43 } 58 }
44 } 59 }
45 @property key_code { 60 @property key_code {
46 [[Key scan code numeric value.]] 61 [[Keyboard scan code of the physical key that produced this event.
62
63 You typically do not need to use this field, because the system maps scan
64 codes to the more convenient @.key_name.
65 Us this in keyboard remapping applications or when trying to use a keyboard
66 unknown to your operating system.
67 ]]
47 values { 68 values {
48 val: int; [[Key scan code]] 69 val: int; [[Keyboard scan code.]]
49 } 70 }
50 } 71 }
51 } 72 }