summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibKeyboard
AgeCommit message (Collapse)Author
2023-05-12LibKeyboard: Read keymap through File, not DeprecatedFileBen Wiederhake
This results in a new OOM prevention. Hooray!
2023-02-13LibCore: Rename `File` to `DeprecatedFile`Tim Schumacher
As usual, this removes many unused includes and moves used includes further down the chain.
2023-01-26LibKeyboard: Replace uses of JsonObject::get_deprecated()/get_ptr()Sam Atkins
2023-01-17AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()Sam Atkins
This is a preparatory step to making `get()` return `ErrorOr`.
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
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