Add ability to have seperate NumLock key bindings for on & off states.

SVN revision: 27417
This commit is contained in:
Christopher Michael 2006-12-11 10:19:46 +00:00
parent 57a782b2c3
commit 5f749052d9
1 changed files with 12 additions and 4 deletions

View File

@ -1041,6 +1041,8 @@ _grab_key_down_cb(void *data, int type, void *event)
mod |= E_BINDING_MODIFIER_ALT;
if (ev->modifiers & ECORE_X_MODIFIER_WIN)
mod |= E_BINDING_MODIFIER_WIN;
if (ev->modifiers & ECORE_X_LOCK_NUM)
mod |= ECORE_X_LOCK_NUM;
if (cfdata->locals.add)
{
@ -1317,6 +1319,12 @@ _key_binding_text_get(E_Config_Binding_Key *bi)
free(l);
}
if (bi->modifiers & ECORE_X_LOCK_NUM)
{
if (b[0]) strcat(b, " ");
strcat(b, _("OFF"));
}
if (!b[0]) return strdup(TEXT_NONE_ACTION_KEY);
return strdup(b);
}