version 1.4, 2009/11/30 16:44:03 |
version 1.5, 2009/12/03 22:50:10 |
|
|
* character: |
* character: |
* |
* |
* 2 Shift |
* 2 Shift |
* 3 Alt |
* 3 Alt |
* 4 Shift + Alt |
* 4 Shift + Alt |
* 5 Ctrl |
* 5 Ctrl |
* 6 Shift + Ctrl |
* 6 Shift + Ctrl |
* 7 Alt + Ctrl |
* 7 Alt + Ctrl |
* 8 Shift + Alt + Ctrl |
* 8 Shift + Alt + Ctrl |
* |
* |
* Rather than parsing them, just match against a table. |
* Rather than parsing them, just match against a table. |
|
|
{ KEYC_DC, "\033[3;_~" }, |
{ KEYC_DC, "\033[3;_~" }, |
}; |
}; |
|
|
/* |
/* |
* Match key against buffer, treating _ as a wildcard. Return -1 for no match, |
* Match key against buffer, treating _ as a wildcard. Return -1 for no match, |
* 0 for match, 1 if the end of the buffer is reached (need more data). |
* 0 for match, 1 if the end of the buffer is reached (need more data). |
*/ |
*/ |
|
|
case '7': |
case '7': |
return (KEYC_ESCAPE|KEYC_CTRL); |
return (KEYC_ESCAPE|KEYC_CTRL); |
case '8': |
case '8': |
return (KEYC_SHIFT|KEYC_ESCAPE|KEYC_CTRL); |
return (KEYC_SHIFT|KEYC_ESCAPE|KEYC_CTRL); |
} |
} |
return (0); |
return (0); |
} |
} |
|
|
} |
} |
if (i == nitems(xterm_keys_table)) |
if (i == nitems(xterm_keys_table)) |
return (NULL); |
return (NULL); |
|
|
/* Copy the template and replace the modifier. */ |
/* Copy the template and replace the modifier. */ |
out = xstrdup(entry->template); |
out = xstrdup(entry->template); |
out[strcspn(out, "_")] = '0' + modifiers; |
out[strcspn(out, "_")] = '0' + modifiers; |