Copyright © 2008-2011 Kristian Høgsberg Copyright © 2010-2013 Intel Corporation Copyright © 2012-2013 Collabora, Ltd. Copyright © 2018 Purism SPC Copyright © 2023 Simon Ser Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This protocol allows privileged clients to create a virtual keyboard device and emit synthetic input events. It is intended to be used by remote desktop applications and on-screen keyboards. The compositor may choose to restrict this protocol to a special client launched by the compositor itself or expose it to all privileged clients, this is compositor policy. The key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may", and "optional" in this document are to be interpreted as described in IETF RFC 2119. Warning! The protocol described in this file is currently in the testing phase. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes can only be done by creating a new major version of the extension. A virtual keyboard manager allows an application to create virtual keyboards. Create a new virtual keyboard. If the seat is null, the compositor will pick one. If the seat is non-null, the compositor must attach the virtual keyboard to that seat or immediately send the finished event on the newly created virtual keyboard object. Destroy the virtual keyboard manager. Existing ext_virtual_keyboard_v1 objects remain valid. The virtual keyboard interface allows a client to send synthetic keyboard input events. The virtual keyboard has exclusive control over its modifier state. The compositor must ensure that the correct modifier state is applied before passing on events from the virtual keyboard to wl_keyboard. Provide a file descriptor to the compositor which can be memory-mapped to provide a keyboard mapping description. The FD must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail. The underlying keymap data must remain available as long as the object hasn't been destroyed. If the keymap format is invalid, the invalid_keymap protocol error is raised. The only valid format is xkb_v1. The compositor must take care to notify clients of the correct keymap before it sends other wl_keyboard events, i.e. set the keymap corresponding to the event source. Notify that a key was pressed or released. The time argument is a timestamp with millisecond granularity in the CLOCK_MONOTONIC domain. If the state is invalid, the invalid_key_state protocol error is raised. If no keymap has been set, the missing_keymap protocol error is raised. Valid values for state are released, pressed and repeated from wl_keyboard.key_state. All other values are invalid. Notify that the modifier and/or group state has changed. If no keymap has been set, the missing_keymap protocol error is raised. Sets the repeat info for associated wl_keyboard objects. This request should be passed by the compositor to clients via the wl_keyboard.repeat_info event. Destroy the virtual keyboard. The compositor should release any pressed keys. The compositor has decided that the virtual keyboard should be destroyed as it will no longer be used by the compositor. Exactly when this event is sent is compositor policy, but it must never be sent more than once for a given virtual keyboard object. This might be sent because the user has decided to stop the virtual input device, or the compositor has decided to deny the client request for some other reason. Upon receiving this event, the client should send a destroy request.