From 9bdc18da391979479ad5c677770c3e8dffa1cb9a Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sun, 20 Sep 2009 15:06:07 +0200 Subject: Keymaps are now loaded from ramfs. --- Source/Kernel/Core/kmain.wtf.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Source/Kernel/Core') diff --git a/Source/Kernel/Core/kmain.wtf.cpp b/Source/Kernel/Core/kmain.wtf.cpp index 4c576b6..6862e18 100644 --- a/Source/Kernel/Core/kmain.wtf.cpp +++ b/Source/Kernel/Core/kmain.wtf.cpp @@ -28,7 +28,6 @@ #include #include -#include extern u32int end; //Placement address @@ -116,7 +115,7 @@ void kmain(multiboot_info_t* mbd, u32int magic) { Log::log(KL_STATUS, "kmain : Registered textual VGA output"); Dev::registerDevice(new PS2Keyboard()); //Initialize keyboard driver - Kbd::setKeymap(keymap_normal, keymap_shift, keymap_caps, keymap_altgr, keymap_shiftaltgr); //Load keymap + Kbd::loadKeymap("fr"); Kbd::setFocus(kvt); //Set focus to virtual terminal Log::log(KL_STATUS, "kmain : Keyboard set up"); @@ -138,6 +137,7 @@ void kmain(multiboot_info_t* mbd, u32int magic) { *kvt << " - halt shuts down your computer\n"; *kvt << " - panic causes a kernel panic\n"; *kvt << " - devices shows all detected devices on your computer\n"; + *kvt << " - loadkeys loads specified kekymap\n"; *kvt << " - free shows memory usage (physical frames and kernel heap)\n"; *kvt << " - uptime shows seconds since boot\n"; *kvt << " - part shows all detected block devices and partitions\n"; @@ -243,6 +243,14 @@ void kmain(multiboot_info_t* mbd, u32int magic) { kvt->setCursorCol(25); *kvt << dev[i]->getName() << "\n"; } + } else if (tokens[0] == "loadkeys") { + if (tokens.size() == 1) { + *kvt << "Error : no argument specified.\n"; + } else { + if (!Kbd::loadKeymap(tokens[1])) { + *kvt << "Error while loading keymap " << tokens[1] << ".\n"; + } + } } else if (tokens[0] == "free") { u32int frames = PhysMem::total(), freef = PhysMem::free(); *kvt << " - Free frames : " << (s32int)freef << " (" << (s32int)(freef * 4 / 1024) << "Mo) of " -- cgit v1.2.3