diff options
author | Alexis211 <alexis211@gmail.com> | 2009-09-20 15:06:07 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-09-20 15:06:07 +0200 |
commit | 9bdc18da391979479ad5c677770c3e8dffa1cb9a (patch) | |
tree | 412f79bf1dcbc5ea11d8aff6d2b016dacab2de3c /Source/Kernel/Core | |
parent | af3ff7f8c80bb3953f261a602316f92ec662daa8 (diff) | |
download | Melon-9bdc18da391979479ad5c677770c3e8dffa1cb9a.tar.gz Melon-9bdc18da391979479ad5c677770c3e8dffa1cb9a.zip |
Keymaps are now loaded from ramfs.
Diffstat (limited to 'Source/Kernel/Core')
-rw-r--r-- | Source/Kernel/Core/kmain.wtf.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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 <Core/Log.ns.h> #include <Ressources/Graphics/logo.text.cxd> -#include <Ressources/Keymaps/fr.cxd> 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 " |