1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:57:46 +00:00

Kernel: Add keyboard ioctl to get num/caps lock state

This commit is contained in:
Edwin Hoksberg 2021-07-05 21:14:38 +02:00 committed by Gunnar Beutner
parent 864b50b5c2
commit 385e2ccb66
3 changed files with 47 additions and 0 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
* Copyright (c) 2021, Edwin Hoksberg <mail@edwinhoksberg.nl>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -35,6 +36,9 @@ public:
// ^Device
virtual mode_t required_mode() const override { return 0440; }
// ^File
virtual int ioctl(FileDescription&, unsigned request, FlatPtr arg) override;
virtual String device_name() const override { return String::formatted("keyboard{}", minor()); }
void update_modifier(u8 modifier, bool state)