Allow stacking drivers in a linked list; try all of them at getkey() time

This commit is contained in:
Paul LeoNerd Evans
2008-11-09 19:58:11 +00:00
parent aef2e91277
commit 73cee7f0b0
2 changed files with 87 additions and 36 deletions

View File

@@ -23,6 +23,13 @@ struct keyinfo {
int modifier_set;
};
struct termkey_drivernode;
struct termkey_drivernode {
struct termkey_driver *driver;
void *info;
struct termkey_drivernode *next;
};
struct termkey {
int fd;
int flags;
@@ -44,8 +51,7 @@ struct termkey {
// There are 32 C0 codes
struct keyinfo c0[32];
struct termkey_driver driver;
void *driver_info;
struct termkey_drivernode *drivers;
// Now some "protected" methods for the driver to call but which we don't
// want exported as real symbols in the library