The modkey is a single simple char like "g". The key can also contain
special keys and modifiers and is given in format like "<ctrl-o>", "<tab>",
-"<shift-tab>" or also a simple char like "G".
+"<shift-tab>", "<up>", "<right>" or also a simple char like "G".
Example:
.br
{"cmap <tab>=complete"},
{"cmap <shift-tab>=complete-back"},
{"cmap <ctrl-p>=hist-prev"},
+ {"cmap <up>=hist-prev"},
{"cmap <ctrl-n>=hist-next"},
+ {"cmap <down>=hist-next"},
{"hmap <tab>=hint-focus-next"},
{"hmap <shift-tab>=hint-focus-prev"},
{"searchengine-add dl=https://duckduckgo.com/lite/?q=%s"},
static guint keybind_str_to_value(const char* str)
{
- if (g_ascii_strcasecmp(str, "tab") == 0) {
+ if (!strcmp(str, "tab")) {
return GDK_Tab;
+ } else if (!strcmp(str, "up")) {
+ return GDK_Up;
+ } else if (!strcmp(str, "down")) {
+ return GDK_Down;
+ } else if (!strcmp(str, "left")) {
+ return GDK_Left;
+ } else if (!strcmp(str, "right")) {
+ return GDK_Right;
}
return str[0];