feature: layout command to change between us and fr layouts
This commit is contained in:
19
src/shell/commands/layout_cmd.c
Normal file
19
src/shell/commands/layout_cmd.c
Normal file
@ -0,0 +1,19 @@
|
||||
#include "keyboard.h"
|
||||
#include "kprintf.h"
|
||||
#include "string.h"
|
||||
|
||||
extern char const **keymap;
|
||||
|
||||
void layout_cmd(char *arg)
|
||||
{
|
||||
if (!strcmp(arg, "us") || !strcmp(arg, "qwerty")) {
|
||||
kprintf("Successfully changed layout to us/qwerty\n");
|
||||
keymap = qwerty_keymap;
|
||||
} else if (!strcmp(arg, "fr") || !strcmp(arg, "azerty")) {
|
||||
kprintf("Successfully changed layout to fr/azerty\n");
|
||||
keymap = azerty_keymap;
|
||||
} else {
|
||||
kprintf(
|
||||
"Invalid argument: please type us|qwerty or fr|azerty\n");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user