feat: add support for fido yubikeys (#89)

* add support for fido keybind

* add to themes

* fix clang format

* Update ui.c

* docs: add misc stuff about the yubikey

---------

Co-authored-by: javalsai <jvssxxi@gmail.com>
This commit is contained in:
creations
2025-12-13 15:37:58 -05:00
committed by GitHub
parent feeba5c41b
commit a7a1f42f0a
9 changed files with 135 additions and 22 deletions

View File

@@ -92,6 +92,7 @@ BUILD(chars, CHARS, TABLE_CHARS);
#define TABLE_FUNCTIONS(F, name) \
F(enum keys, poweroff, KEY, F1, name) \
F(enum keys, reboot, KEY, F2, name) \
F(enum keys, fido, KEY, NONE, name) \
F(enum keys, refresh, KEY, F5, name)
BUILD(functions, FUNCTIONS, TABLE_FUNCTIONS);
@@ -99,6 +100,7 @@ BUILD(functions, FUNCTIONS, TABLE_FUNCTIONS);
#define TABLE_STRINGS(F, name) \
F(char* NNULLABLE, f_poweroff, STRING, "poweroff", name) \
F(char* NNULLABLE, f_reboot, STRING, "reboot", name) \
F(char* NNULLABLE, f_fido, STRING, "fido", name) \
F(char* NNULLABLE, f_refresh, STRING, "refresh", name) \
F(char* NNULLABLE, e_user, STRING, "user", name) \
F(char* NNULLABLE, e_passwd, STRING, "password", name) \

View File

@@ -32,9 +32,11 @@ enum keys {
END,
PAGE_UP,
PAGE_DOWN,
NONE,
};
static const char* const KEY_NAMES[] = {
[NONE] = "NONE",
[ESC] = "ESC",
[F1] = "F1",
[F2] = "F2",

View File

@@ -46,6 +46,8 @@ void setup(struct config* config);
int load(struct Vector* users, struct Vector* sessions);
void print_err(const char* /*msg*/);
void print_errno(const char* /*descr*/);
void print_pam_msg(const char* msg, int msg_style);
void clear_pam_msg(void);
void ui_update_field(enum input focused_input);
void ui_update_ffield();