Tizen Native API  7.0
Key Input Functions

Functions that feed key events to the canvas.

As explained in intro_not_evas, Evas is not aware of input systems at all. Then, the user, if using it crudely (evas_new()), will have to feed it with input events, so that it can react somehow. If, however, the user creates a canvas by means of the Ecore_Evas wrapper, it will automatically bind the chosen display engine's input events to the canvas, for you.

This group presents the functions dealing with the feeding of key events to the canvas. On most of them, one has to reference a given key by a name (keyname argument). Those are platform dependent symbolic names for the keys. Sometimes you'll get the right keyname by simply using an ASCII value of the key name, but it won't be like that always.

Typical platforms are Linux frame buffer (Ecore_FB) and X server (Ecore_X) when using Evas with Ecore and Ecore_Evas. Please refer to your display engine's documentation when using evas through an Ecore helper wrapper when you need the keynames.

Example:

   mods = evas_key_modifier_get(evas);
   if (evas_key_modifier_is_set(mods, "Control") &&
       (strcmp(ev->key, "o") == 0)) /* add an obscured
                                        * rectangle to the middle
                                        * of the canvas */
     {

All the other evas_key functions behave on the same manner. See the full example.

Functions

Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname)
Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname)

Typedefs

typedef struct _Evas_Lock Evas_Lock
typedef struct _Evas_Modifier Evas_Modifier
typedef unsigned long long Evas_Modifier_Mask

Typedef Documentation

typedef struct _Evas_Lock Evas_Lock

An opaque type containing information on which lock keys are registered in an Evas canvas.

typedef struct _Evas_Modifier Evas_Modifier

An opaque type containing information on which modifier keys are registered in an Evas canvas.

typedef unsigned long long Evas_Modifier_Mask

A bitmask of modifier keys.

See evas_key_modifier_mask_get() for the keyname to bit conversion.


Function Documentation

Eina_Bool evas_key_lock_is_set ( const Evas_Lock l,
const char *  keyname 
)

Checks the state of a given lock key of the default seat, at the time of the call. If the lock is set, such as caps lock, this function returns Eina_True.

Parameters:
lThe current locks set, as returned by evas_key_lock_get().
keynameThe name of the lock key to check status for.
Returns:
Eina_True if the keyname lock key is set, Eina_False otherwise.
See also:
evas_key_lock_get
evas_key_lock_add
evas_key_lock_del
evas_key_lock_on
evas_key_lock_off
evas_seat_key_lock_on
evas_seat_key_lock_off
evas_seat_key_lock_is_set
Since :
2.3
Eina_Bool evas_key_modifier_is_set ( const Evas_Modifier m,
const char *  keyname 
)

Checks the state of a given modifier of the default seat, at the time of the call. If the modifier is set, such as shift being pressed, this function returns Eina_True.

Parameters:
mThe current modifiers set, as returned by evas_key_modifier_get().
keynameThe name of the modifier key to check status for.
Returns:
Eina_True if the modifier key named keyname is on, Eina_False otherwise.
See also:
evas_key_modifier_add
evas_key_modifier_del
evas_key_modifier_get
evas_key_modifier_on
evas_key_modifier_off
evas_seat_key_modifier_is_set
Since :
2.3
Examples:
ecore_imf_example.c, edje-box2.c, evas-aspect-hints.c, evas-box.c, evas-events.c, evas-hints.c, and web_example_02.c.