summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibKeyboard
AgeCommit message (Collapse)Author
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-01-21Kernel: Stop using LibKeyboard's CharacterMap in HIDManagementIdan Horowitz
This was easily done, as the Kernel and Userland don't actually share any of the APIs exposed by it, so instead the Kernel APIs were moved to the Kernel, and the Userland APIs stayed in LibKeyboard. This has multiple advantages: * The non OOM-fallible String is not longer used for storing the character map name in the Kernel * The kernel no longer has to link to the userland LibKeyboard code * A lot of #ifdef KERNEL cruft can be removed from LibKeyboard
2022-01-06LibKeyboard: Change some Optional<T> returns to ErrorOr<T>RasmusNylander
Makes CharacterMapFile::load_from_file and CharacterMap::load_from_file return ErrorOr instead of Optional. This makes them a little nicer to use and a little easier to read, as they seem to have been approximating this.
2021-11-17AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional)Andreas Kling
Also add slightly richer parse errors now that we can include a string literal with returned errors. This will allow us to use TRY() when working with JSON data.
2021-11-08LibKeyboard: Use ErrorOr<T> for CharacterMap::fetch_system_map()Andreas Kling
2021-09-18AK: Make Utf8View constructors inline and remove C string constructorAndreas Kling
Using StringView instead of C strings is basically always preferable. The only reason to use a C string is because you are calling a C API.
2021-06-30LibKeyboard: Remove an unnecessary #include when building with KERNELAndreas Kling
2021-06-29AK+Everywhere: Change int to size_t in JsonObject and JsonArrayMax Wipfli
2021-06-06LibKeyboard: Use correct filename in debug messageNonStdModel
2021-05-12LibCore+Everywhere: Move OpenMode out of IODeviceAli Mohammad Pur
...and make it an enum class so people don't omit "OpenMode".
2021-04-29Everywhere: "file name" => "filename"Andreas Kling
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-03LibKeyboard: Mark CharacterMap::get_char as constLiav A
Also, mark character_map_name method as const and make it to return const String& instead of const String.
2021-02-05Userland: Add LibSystem and funnel all syscalls through itAndreas Kling
This achieves two things: - Programs can now intentionally perform arbitrary syscalls by calling syscall(). This allows us to work on things like syscall fuzzing. - It restricts the ability of userspace to make syscalls to a single 4KB page of code. In order to call the kernel directly, an attacker must now locate this page and call through it.
2021-02-03LibC+LibKeyboard: Move getkeymap()+setkeymap() syscall wrappers to LibCAndreas Kling
2021-02-01Kernel+LibKeyboard: Define the default keymap only in one placeBen Wiederhake
Because it was 'static const' and also shared with userland programs, the default keymap was defined in multiple places. This commit should save several kilobytes! :^)
2021-02-01LibKeyboard: Don't assert on failureBen Wiederhake
2021-02-01LibKeyboard+keymap: Support querying the keymap via commandlineBen Wiederhake
2021-02-01Kernel+LibKeyboard: Enable querying the current keymapBen Wiederhake
2021-01-16Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling