1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:07:45 +00:00

KeyboardSettings+Kernel: Setting to enable Num Lock on login

This commit is contained in:
ForLoveOfCats 2021-07-03 19:41:28 -04:00 committed by Gunnar Beutner
parent 7fdeb0ec74
commit ce6658acc1
11 changed files with 58 additions and 1 deletions

View file

@ -98,6 +98,11 @@ void HIDManagement::set_maps(const Keyboard::CharacterMapData& character_map_dat
dbgln("New Character map '{}' passed in by client.", character_map_name);
}
void HIDManagement::set_num_lock(bool on)
{
m_i8042_controller->keyboard()->set_num_lock(on);
}
UNMAP_AFTER_INIT void HIDManagement::enumerate()
{
// FIXME: When we have USB HID support, we should ensure that we disable

View file

@ -45,6 +45,7 @@ public:
const Keyboard::CharacterMap& character_map() const { return m_character_map; }
void set_client(KeyboardClient* client) { m_client = client; }
void set_maps(const Keyboard::CharacterMapData& character_map, const String& character_map_name);
void set_num_lock(bool on);
private:
size_t generate_minor_device_number_for_mouse();

View file

@ -45,6 +45,8 @@ public:
m_modifiers &= ~modifier;
}
void set_num_lock(bool on) { m_num_lock_on = on; }
protected:
KeyboardDevice();
mutable SpinLock<u8> m_queue_lock;