diff options
author | DuClare <akarinotengoku@gmail.com> | 2009-05-15 22:50:49 +0300 |
---|---|---|
committer | DuClare <akarinotengoku@gmail.com> | 2009-05-15 22:50:49 +0300 |
commit | 8399acaffb84752f6a34253a313362d78384f913 (patch) | |
tree | 3cd74bfaee8eb082004e530d80ee548e8c30ceb2 /uzbl.c | |
parent | 5dda3ed92972de96f3f1fc1cc126647d43791eee (diff) |
KEYCMD stub
Diffstat (limited to 'uzbl.c')
-rw-r--r-- | uzbl.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -769,6 +769,8 @@ setup_regex() { G_REGEX_UNGREEDY|G_REGEX_OPTIMIZE, 0, &err); uzbl.comm.cmd_regex = g_regex_new("^[Cc][a-zA-Z]*\\s+([^ \\n]+)\\s*([^\\n]*)?$", G_REGEX_OPTIMIZE, 0, &err); + uzbl.comm.keycmd_regex = g_regex_new("^[Kk][a-zA-Z]*\\s+([^\\n]+)$", + G_REGEX_OPTIMIZE, 0, &err); } static gboolean @@ -970,6 +972,13 @@ parse_cmd_line(const char *ctl_line) { else printf("Error in command: %s\n", tokens[0]); } + else if(ctl_line[0] == 'K' || ctl_line[0] == 'k') { + tokens = g_regex_split(uzbl.comm.keycmd_regex, ctl_line, 0); + if(tokens[0][0] == 0) { + // TODO: emulate keypresses + g_strfreev(tokens); + } + } /* Comments */ else if( (ctl_line[0] == '#') || (ctl_line[0] == ' ') |