Implementation method of cross-platform cloud keyboard
By establishing a cross-platform keyboard protocol and storing data in the cloud, the problem of poor compatibility of custom keyboards across different device platforms has been solved, enabling unified display and personalized creation of cross-platform custom keyboards, thus improving user experience and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI BEIRUI INFORMATION TECH CO LTD
- Filing Date
- 2025-02-10
- Publication Date
- 2026-05-01
AI Technical Summary
Existing custom keyboards have poor compatibility across different device platforms, making it difficult to achieve a consistent user experience. Furthermore, they require frequent creation when switching devices, which is time-consuming and laborious, and they are not suitable for various application scenarios.
A cross-platform keyboard protocol is established, which uniformly defines keyboard names, key codes, key types, key sizes, key positions, and key transparency. Keyboard data is stored in the cloud, and users can download, parse, and draw it on the client. Custom keyboard creation and modification are supported, enabling unified display and use across platforms.
It achieves a unified effect for custom keyboards across multiple platforms, meets personalized needs, improves efficiency and convenience, and adapts to various application scenarios.
Smart Images

Figure CN119960888B_ABST
Abstract
Description
A method for implementing a cross-platform cloud keyboard Technical Field
[0001] This invention relates to the field of cloud technology, and in particular to a method for implementing a cross-platform cloud keyboard. Background Technology
[0002] With the popularization of internet technology, remote work and remote gaming are becoming increasingly common, leading to higher demands for efficiency, convenience, and user experience. Custom keyboards (including peripherals like mice) are gaining popularity because they allow users to customize keyboard layout, input behavior, and appearance according to their preferences and needs, improving user efficiency and experience. However, custom keyboards require attention to compatibility and performance optimization across different device platforms. Mobile devices, such as smartphones, are often criticized for their limited input area and poor operational smoothness. While some existing remote clients offer custom keyboard solutions, they are mostly limited to local use; data is lost when the user switches devices, making reuse difficult and requiring frequent creation, which is time-consuming and laborious. Furthermore, the diversity of mobile devices (different sizes, different resolutions) makes it difficult to achieve a consistent user experience. The differences in operation methods and screen sizes between mobile phones and PCs also make unification challenging. Therefore, there is an urgent need for a cross-platform cloud keyboard solution with low compatibility and a good user experience to adapt to various application scenarios and across different device platforms. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a cross-platform cloud keyboard implementation method that can be applied to multiple platforms and has a consistent effect, applicable to various scenarios.
[0004] This invention is achieved through the following technical solution:
[0005] A method for implementing a cross-platform cloud keyboard includes the following steps:
[0006] S1. Establish a cross-platform keyboard protocol to define and unify the keyboard name, key code table, key type, key name, key size, key position and key transparency of the cloud keyboard on various platforms. The key type includes ordinary keyboard keys, mouse keys, scroll wheel keys and gamepad keys. A keyboard contains multiple keys.
[0007] S2. Collect regular keyboard usage data from users. Generate several universal keyboards based on the keyboard protocol and the regular keyboard usage data. Save the keyboard data corresponding to each keyboard in the cloud for users to download. After a user downloads a universal keyboard from the cloud using their identity ID on the client, the keyboard data corresponding to that keyboard is parsed and drawn according to the keyboard protocol. After drawing, the data is displayed to the user. The regular keyboard usage data includes the keyboard key types, key sizes, key positions, and key transparency. That is, for ordinary users, the types of keys they usually use, such as which ordinary keyboard keys, mouse keys, scroll wheel keys, and game controller keys they need to use, as well as the size, position, and transparency of these keys.
[0008] S3. When a user needs to create a personalized custom keyboard, the client displays the corresponding menu and keys according to the keyboard protocol for the user to select, modify and drag. The user can create a personalized custom keyboard by selecting the key type, key size and key transparency, customizing the keyboard name and key name, and modifying the key position by dragging the keys. The keyboard data of the created custom keyboard is saved to the cloud.
[0009] S4. When a user needs to modify or edit a downloaded general keyboard or a custom keyboard, the client displays the corresponding menu and keys according to the keyboard protocol for the user to select, modify, and drag. The user can modify the keyboard by selecting the key type, key size, and key transparency, modifying the keyboard name and key name, and modifying the key position by dragging the keys, and save the modified keyboard data to the cloud.
[0010] S5. Multiple keyboards synchronized by the user are stored in the cloud. When a user needs to use the cloud keyboard, the client requests the user's keyboard list stored in the cloud through the user's identity ID and displays it to the user for selection, use, and sharing. When a user downloads a keyboard from the cloud, the client parses and draws the keyboard data corresponding to that keyboard according to the keyboard protocol, and then displays it to the user after drawing.
[0011] Furthermore, the keyboard protocol includes the standardization of keyboard key codes. The standardized keyboard is based on the 108-key Windows full keyboard, plus Mac keyboard-specific keys, mouse buttons, scroll wheel buttons, and gamepad buttons. The Mac keyboard-specific keys include the Command key. Option key Control key (^), Shift key The mouse buttons include the left, right, and middle mouse buttons, the scroll wheel buttons include the up and down buttons of the mouse wheel, the up button indicates scrolling the wheel upwards, and the down button indicates scrolling the wheel downwards, and the gamepad buttons include the directional buttons on the gamepad.
[0012] Furthermore, in the 108 keys of the Windows full keyboard, the left Ctrl key and right Ctrl key, the left Shift key and right Shift key, and the left Alt key and right Alt key are all distinguished.
[0013] Furthermore, the keyboard protocol includes standardizing key positions, key sizes, and key transparency, using the following method:
[0014] For button size, use size to define the size of each button. The size value ranges from 1 to 10, representing the minimum to the maximum, and the size value is set according to different button types.
[0015] For button transparency, use alpha to define the transparency of each button. The alpha value ranges from 0 to 1.0f, representing from completely transparent to completely opaque. Set the alpha value as needed.
[0016] For key placement, on mobile devices, the entire screen of the mobile device is used as the base of the keyboard. The ratio of the distance from the center of the key to the left edge of the screen to the width of the screen is used to obtain the key's proportion in the X-axis direction, centerx. The ratio of the distance from the center of the key to the top edge of the screen to the height of the screen is used to obtain the key's proportion in the Y-axis direction, centery. The values of centerx and centery range from 0 to 1.0. The closer the centerx value is to 0, the closer the key is to the left side of the screen. The closer it is to 1, the closer the key is to the right side of the screen. The closer the centery value is to 0, the closer the key is to the top of the screen. The closer it is to 1, the closer the key is to the bottom of the screen. This is how the keys are displayed on the mobile device screen.
[0017] For PC devices, a fixed area at the bottom center of the PC screen is used as the keyboard base. The ratio of the key's center to the left edge of the fixed area is calculated to the width of the fixed area, resulting in the key's X-axis ratio, centerx. The ratio of the key's center to the top edge of the fixed area is calculated to the height of the fixed area, resulting in the key's Y-axis ratio, centery. The values of centerx and centery range from 0 to 1.0. The closer the centerx value is to 0, the closer the key is to the left side of the screen; the closer it is to 1, the closer the key is to the right side of the screen. The closer the centery value is to 0, the closer the key is to the top of the screen; the closer it is to 1, the closer the key is to the bottom of the screen. A resolution of 960×540 pixels is used to display the keyboard on the PC screen.
[0018] Furthermore, the keyboard protocol includes distinguishing key types:
[0019] The button type is distinguished by type, which is mainly divided into ordinary keyboard buttons, mouse buttons, scroll wheel buttons, and gamepad buttons. type 0 indicates ordinary keyboard type, type 1 indicates mouse and scroll wheel type, and type 2 indicates gamepad type.
[0020] For regular keyboard keys, use commands to store key information, keyname to store custom key names, and presstype to distinguish press types. Press types are divided into instant type keys and lock type keys. Instant type keys are keys that respond only after being pressed, while lock type keys are keys that remain pressed after being pressed.
[0021] For mouse-type buttons and scroll wheel-type buttons, mousetype is used to distinguish between mouse buttons and scroll wheel buttons. mousetype 0 represents the left mouse button, mousetype 1 represents the right mouse button, mousetype 2 represents the middle mouse button, mousetype 3 represents the scroll wheel up button, and mousetype 4 represents the scroll wheel down button.
[0022] For gamepad-type buttons, the directional pad is distinguished by "handshanktype" and the button operation type is distinguished by "operationtype". The button operation type is divided into drag-and-drop and press-and-click.
[0023] Furthermore, the keyboard protocol uses JSON format, with the keyboard name stored in the name field, multiple keyboards of the user stored in the form of a gamepad array, and multiple key information of each keyboard stored in the form of a body array.
[0024] Furthermore, methods for parsing and drawing keyboard data include:
[0025] a. Traverse the keyboard data set and determine the key type based on the keyboard protocol;
[0026] b. If it is a normal keyboard type key, obtain the key's position, size, transparency information and whether there is a custom key name, draw the keyboard according to the keyboard protocol, if there is a custom key name, draw the keyboard containing the custom key, and draw all keys at the specified position on the keyboard base.
[0027] c. If it is a mouse button, obtain the button's position, size, and transparency information, and draw the corresponding mouse image to the specified position on the keyboard base.
[0028] d. If it is a scroll wheel type key, obtain the key's position, size, and transparency information, and draw the corresponding scroll wheel image to the specified position on the keyboard base plate according to the scroll wheel type;
[0029] e. If it is a gamepad-type button, determine the button type, then determine whether the button operation type is drag-and-drop or press-and-press. Based on the button type, button operation type, button position, size and transparency information, draw the corresponding gamepad image to the specified position on the keyboard base.
[0030] f. Repeat the AE steps until all data in the keyboard data set has been traversed, and add all the keys on the keyboard to the keyboard base plate one by one according to their position information to complete the drawing of the entire keyboard.
[0031] Furthermore, the methods of using the keyboard include:
[0032] When a user presses a key, the type of key press is determined according to the keyboard protocol;
[0033] If the key being operated is a regular keyboard key, determine whether the key is an instant or locked key. If it is a locked key, process the selection effect and then send the corresponding key information.
[0034] If the operation is a mouse button, send the corresponding mouse event;
[0035] If the operation is a scroll wheel type button, send the corresponding scroll wheel event;
[0036] If the operation involves a gamepad-type button, send the corresponding gamepad information based on the gamepad button type and button operation type.
[0037] This invention establishes a keycode table for custom keyboard keys, enabling multi-platform recognition. It adds protocol distinctions for keyboard events, mouse events, and gamepad events, supporting key size, transparency, position, key combinations, and custom key names. For seamless cross-platform compatibility, different display schemes are developed for different platforms. On mobile devices, the keyboard is displayed in full-screen mode, while on PCs, a designated area, such as a 960×540 area in the lower center of the screen, is displayed. Key positions are calculated based on the distance from the key center to the upper left and the percentage of width and height, maximizing display consistency. Downloaded cloud keyboard data is rendered and displayed according to the keyboard protocol. Users can also manually edit downloaded keyboard information, create or modify existing keyboard data, and save or share it with other users. Through these solutions, this invention effectively achieves a unified cross-platform effect for custom keyboards, fully demonstrating the flexibility and applicability of custom keyboards, meeting the personalized needs of users on various platforms. Furthermore, this cross-platform concept can be applied to other scenarios requiring cross-platform adaptation. Attached Figure Description
[0038] Figure 1 is a flowchart of the method of the present invention.
[0039] Figure 2 shows the effect of a custom keyboard created by the present invention.
[0040] Figure 3 shows the effect of a custom keyboard with built-in DNF created by the present invention. Detailed Implementation
[0041] A method for implementing a cross-platform cloud keyboard, as shown in Figure 1, includes the following steps:
[0042] S1. Establish a cross-platform keyboard protocol to define and unify the keyboard name, key code table, key type, key name, key size, key position, and key transparency of the cloud keyboard on various platforms. The key types include ordinary keyboard keys, mouse keys, scroll wheel keys, and gamepad keys. A keyboard contains multiple keys.
[0043] Cross-platform keyboard protocols define and manage keyboards to enable their use on different device platforms. By storing the corresponding keyboard data in the cloud, it can be downloaded directly from the cloud without needing to be stored on the local device, and it can still be used even when switching devices.
[0044] The cross-platform keyboard protocol mainly specifies the key code table, key types, key names, key sizes, key positions, and key transparency of each keyboard. The specific specifications and implementation methods are as follows:
[0045] (1) In order to maintain cross-platform compatibility and future scalability, JSON format is used as the protocol carrier.
[0046] (2) A user can have multiple keyboards. The keyboard name is stored in the name array. The user can save multiple keyboard information at the same time in the form of gamepad array. The multiple key information of each keyboard is stored in the form of body array.
[0047] (3) Unification of Keycode Table: The first problem that cloud keyboards face is the unification of keyboard keycodes. The cloud keyboard of this invention uses the 108 keys of a Windows full keyboard as a base, plus the unique keys of a Mac keyboard, mouse buttons, scroll wheel buttons, and gamepad buttons to generate a keycode table. Among these, the left and right Ctrl keys, left and right Shift keys, and left and right Alt keys in the 108 keys of the Windows full keyboard have different meanings and need to be distinguished. Support for the numeric keypad is also required. The unique keys of the Mac keyboard include the Command key. Option key Control key (^), Shift key The mouse includes the Fn key (Function). Mouse buttons include the left, right, and middle buttons. Scroll wheel buttons include the up and down buttons; the up button scrolls the wheel upwards, and the down button scrolls it downwards, allowing control of some scrolling movements. The gamepad supports the directional keys. The gamepad also needs to support different click and drag methods. Click refers to pressing and clicking, while drag refers to using the joystick. Note that the Control and Shift keys on a Mac keyboard are different from the Ctrl and Shift keys on a 108-key keyboard; from a user perspective, remote Mac control needs to display the Mac key values. For mice and gamepads, various types and layouts are available, with multiple preset options for users to choose from based on their preferences.
[0048] (4) Standardize button position, button size, and button transparency:
[0049] For button size, use size to define the size of each button. The size value ranges from 1 to 10, representing the minimum to the maximum. Set the size value according to different button types. For some frequently used buttons, you can appropriately increase the size to facilitate operation.
[0050] For button transparency, use alpha to define the transparency of each button. The alpha value ranges from 0 to 1.0f, representing from completely transparent to completely opaque. Set the alpha value as needed.
[0051] Regarding button placement, it's difficult to achieve absolute uniformity due to varying device resolutions. To ensure maximum consistency, specific rules are established for different screen types, as follows:
[0052] For mobile devices with smaller screens, the entire screen is used as the keyboard base. The key's X-axis proportion (centerx) is calculated by dividing the distance from the key's center to the left edge of the screen by the screen's width. Similarly, the Y-axis proportion (centery) is calculated by dividing the distance from the key's center to the top edge of the screen by the screen's height. Centerx and centery range from 0 to 1.0. A centerx value closer to 0 indicates the key's center is closer to the left side of the screen, and a centerx value closer to 1 indicates the center is closer to the right side. Similarly, a centery value closer to 0 indicates the key is closer to the top of the screen, and a centery value closer to 1 indicates the center is closer to the bottom. This method displays the keys on the mobile screen. For PCs, a fixed area at the bottom center of the PC screen is used as the keyboard base. The keyboard can be displayed on the PC screen by selecting an area near the top left of the screen, avoiding obstruction of the taskbar and other interfaces on the screen. The X-axis ratio of the key is calculated by the ratio of the distance from the center of the key to the left edge of the fixed area to the width of the fixed area, and the Y-axis ratio is calculated by the ratio of the distance from the center of the key to the top edge of the fixed area to the height of the fixed area. The values of centerx and centery range from 0 to 1.0. The closer the centerx value is to 0, the closer the center of the key is to the left edge of the screen; the closer it is to 1, the closer it is to the right edge of the screen. The closer the centery value is to 0, the closer the key is to the top edge of the screen; the closer it is to 1, the closer it is to the bottom edge of the screen. A resolution of 960×540 pixels is used to display the keyboard on the PC screen.
[0053] (5) Standardized differentiation of button types:
[0054] Based on button type, buttons are mainly divided into standard keyboard buttons, mouse buttons, scroll wheel buttons, and gamepad buttons. The `type` parameter is used to distinguish button types: `type 0` indicates keyboard buttons, `type 1` indicates mouse and scroll wheel buttons, and `type 2` indicates gamepad buttons. The classification standards and methods differ for different button types, as follows:
[0055] For regular keyboard keys, the `commands` key information is used to store key information. Key information refers to the data or command that each key corresponds to. For example, the Ctrl key corresponds to the function of the regular Ctrl key. Multiple key combinations are supported. Custom keys can also be defined, and their names are stored as `keyname`. Custom keys are key combinations set according to actual needs. For example, the key name is Task Manager, and the key value is Ctrl+Alt+Delete. The `presstype` key is used to distinguish the press type. For regular keyboard keys, they can be divided into instantaneous keys and locked keys based on their press type. Instantaneous keys are keys that respond only after being pressed, while locked keys are keys that remain pressed (clicked) to simulate a long press effect. This type of key is often used in script or game scenarios.
[0056] For mouse-type buttons and scroll wheel-type buttons, distinguish between the left, right, and middle buttons on the mouse, and the up and down buttons on the scroll wheel. Use mousetype to distinguish between mouse buttons and scroll wheel buttons. mousetype 0 represents the left mouse button, mousetype 1 represents the right mouse button, mousetype 2 represents the middle mouse button, mousetype 3 represents the scroll wheel up button, and mousetype 4 represents the scroll wheel down button.
[0057] For gamepad-type keyboards, the directional keys are distinguished by "handshandktype". They are also distinguished by the gamepad operation method, which is either drag-and-drop or press-and-click, similar to the directional keys and joysticks we use on a gamepad. The button operation type is distinguished by "operationtype", which is divided into drag-and-drop and press-and-click.
[0058] S2. Collect regular keyboard usage data from users. Based on the keyboard protocol and the regular keyboard usage data, generate several universal keyboards. Save the keyboard data corresponding to each keyboard in the cloud for users to download. After a user downloads a universal keyboard from the cloud using their identity ID on the client, the corresponding keyboard data is parsed and drawn according to the keyboard protocol. The drawn data is then displayed to the user. The regular keyboard usage data includes the keyboard's key types, key sizes, key positions, and key transparency. That is, for a regular user, it refers to the types of keys they commonly use, such as which ordinary keyboard keys, mouse scroll wheel buttons, and game controller buttons they need to use, as well as the size, position, and transparency of these keys.
[0059] By collecting and analyzing the virtual keyboard usage habits of users on various terminal platforms, such as where they usually place each key on the screen, especially the positions of frequently used keys, the typical key size, key transparency, and so on, especially the settings for game key layouts, these habitual settings are converted into keyboard data according to the aforementioned keyboard protocol. The resulting keyboards are suitable for ordinary users and do not require users to make any additional settings or creations; they can be downloaded and used immediately.
[0060] S3. When a user needs to create a personalized custom keyboard, the client displays the corresponding menu and keys according to the keyboard protocol for the user to select, modify and drag. The user can create a personalized custom keyboard by selecting the key type, key size and key transparency, customizing the keyboard name and key name, and modifying the key position by dragging the keys. The keyboard data of the created custom keyboard is then saved to the cloud.
[0061] This allows for the creation of custom keyboards, catering to the personalized needs of some users. A user can create multiple custom keyboards. The specific creation method is as follows: First, select the keyboard type (regular keyboard, mouse wheel, or game controller). Based on the keyboard type, a corresponding keyboard will pop up for the user to use. For example, for a regular keyboard, a full keyboard will appear for the user to select (not all keys need to be used). The user selects the keys they need to add, supporting multiple selections, and can also modify key names (i.e., rename the keys so the user can easily understand the current key's behavior). Each selected key will generate a corresponding key on the keyboard base by default. The key positions have pre-set values, and users can also drag to change the key positions. Creating mouse wheel or game controller keyboards is similar. Users can also modify the size and key type by clicking on the key. For example, clicking on an added key will bring up a size and transparency settings window for the user to choose from. Figure 2 shows the effect of a custom keyboard, and Figure 3 shows the effect of a custom keyboard with a built-in DNF (Dungeon Fighter Online) interface. Since both are interface images of remotely controlling a PC from a mobile phone, the keyboard is presented with the mobile phone screen as the base.
[0062] S4. When a user needs to modify or edit a downloaded universal or custom keyboard, the client displays the corresponding menus and keys according to the keyboard protocol for the user to select, modify, and drag. Users can modify the keyboard by selecting key types, key sizes, and key transparency, changing the keyboard name and key names, and dragging keys to change their positions. The modified keyboard data is then saved to the cloud. Modifying and creating keyboards based on existing data saves time and effort, and allows the user to save multiple custom keyboards.
[0063] S5. Multiple user-synchronized keyboards are stored in the cloud. When a user needs to use the cloud keyboard, the client requests the user's keyboard list stored in the cloud using the user's identity ID, displays it to the user for selection and use, and the user can also choose whether to share their cloud keyboard to the community for others to use. When a user downloads a keyboard from the cloud, the corresponding keyboard data is parsed and drawn according to the keyboard protocol, and then displayed to the user.
[0064] After a user selects a keyboard, the keyboard data needs to be parsed and displayed. This keyboard data is a collection of data. The process involves iterating through this collection, parsing information such as the size and opacity of each control based on its provided control type and keyboard protocol, and then drawing and rendering it onto the interface for display to the user. The specific method is as follows:
[0065] a. Iterate through the keyboard data set and determine the key type based on the keyboard protocol. Each keyboard corresponds to one array. During iteration, distinguish between different key types (keyboard, mouse wheel, gamepad) and draw the keyboard in one go.
[0066] b. For regular keyboard keys, obtain the key's position, size, transparency information, and whether it has a custom key name. Draw the keyboard according to the keyboard protocol. If there are custom key names, draw the keyboard including the custom keys and draw all keys at the designated positions on the keyboard base. When parsing regular keyboard keys, ensure that multiple selection is supported, custom key names are allowed, and the keys support a selected state (locked).
[0067] c. If it's a mouse button, obtain the button's position, size, and transparency information, and draw the corresponding mouse image onto the designated location on the keyboard base. Mouse buttons cannot be mixed with keyboard buttons; different icons are drawn according to the mouse type for easy user understanding.
[0068] d. If it is a scroll wheel button, obtain the button's position, size, and transparency information, and draw the corresponding scroll wheel image to the specified position on the keyboard base.
[0069] e. If it's a gamepad button, determine the button type, then determine whether the button operation type is drag-and-drop or press-and-click. Based on the button type, button operation type, button position, size, and transparency information, draw the corresponding gamepad image onto the designated position on the keyboard base. The gamepad type mainly needs to distinguish between directional keys and press-and-drop / drag-and-click operations.
[0070] f. Repeat the AE steps until all data in the keyboard data set has been traversed. Dynamically add all the keys on the keyboard to the keyboard base plate according to their position information to complete the drawing of the entire keyboard.
[0071] The methods users use the keyboard include:
[0072] When a user presses a key, the type of key press is determined according to the keyboard protocol;
[0073] If the key being operated is a regular keyboard key, determine whether the key type is instant or locked. If it is a locked key, process the selection effect and then send the corresponding key information, such as to the controlled device.
[0074] If the operation involves a mouse button, send the corresponding mouse event;
[0075] If the operation involves the scroll wheel button, send the corresponding scroll wheel event;
[0076] If the operation involves gamepad buttons, send the corresponding gamepad information based on the gamepad button type and button operation type.
[0077] Below is a sample game keyboard protocol:
[0078]
[0079]
[0080]
[0081]
[0082] Agreement Description
[0083]
[0084]
[0085] The above detailed description is a specific description of feasible embodiments of the present invention. These embodiments are not intended to limit the patent scope of the present invention. All equivalent implementations or modifications that do not depart from the present invention should be included in the patent scope of this case.
Claims
1. A method for implementing a cross-platform cloud keyboard, characterized in that, The process includes the following steps: S1. Establishing a cross-platform keyboard protocol to define and unify the keyboard name, key code table, key type, key name, key size, key position, and key transparency of the cloud keyboard across various platforms. The key types include ordinary keyboard keys, mouse keys, scroll wheel keys, and gamepad keys. A keyboard contains multiple keys. S2. Collecting regular keyboard usage data from users. Based on the keyboard protocol and the regular keyboard usage data, generating several universal keyboards. Saving the keyboard data corresponding to each keyboard in the cloud for users to download. After a user downloads a universal keyboard from the cloud using their identity ID on the client, the client parses and draws the corresponding keyboard data according to the keyboard protocol, and then displays the completed drawing to the user. The regular keyboard usage data includes the key type, key size, key position, and key transparency. S3. When a user needs to create a personalized custom keyboard, the client displays the corresponding menu and keys according to the keyboard protocol for the user to select, modify, and drag. Users can create personalized custom keyboards by selecting key type, key size, and key transparency, customizing keyboard names and key names, and modifying key positions by dragging keys. The keyboard data of the created custom keyboard is then saved to the cloud. S4. When a user needs to modify or edit a downloaded universal or custom keyboard, the client displays the corresponding menus and keys according to the keyboard protocol for the user to select, modify, and drag. The user can modify the keyboard by selecting key type, key size, and key transparency, modifying the keyboard name and key name, and dragging keys to change key positions. The modified keyboard data is then saved to the cloud. S5. The cloud stores multiple keyboards synchronized by the user. When a user needs to use the cloud keyboard, the client requests the user's keyboard list saved in the cloud using the user's identity ID, displays it to the user, and allows the user to select, use, and share it. When a user downloads a keyboard from the cloud, the client parses and draws the corresponding keyboard data according to the keyboard protocol, and then displays the completed drawing to the user. Methods for parsing and drawing keyboard data include: a. Traversing the keyboard data set and determining the key type based on the keyboard protocol; b. If the key is a regular keyboard key, obtain its position, size, transparency, and whether it has a custom key name. Draw the keyboard according to the keyboard protocol. If there is a custom key name, draw the keyboard containing the custom key and place all keys at the designated position on the keyboard base. c. If the key is a mouse key, obtain its position, size, and transparency. Draw the corresponding mouse image at the designated position on the keyboard base. d. If the key is a scroll wheel key, obtain its position, size, and transparency. Draw the corresponding scroll wheel image at the designated position on the keyboard base. e. If the key is a gamepad key, determine the key type and whether the key operation type is drag-and-drop or press-and-hold. Draw the corresponding gamepad image at the designated position on the keyboard base based on the key type, key operation type, key position, size, and transparency. f. Repeat the after effect steps until all data in the keyboard dataset has been traversed. Add all keys on the keyboard to the keyboard base according to their position information to complete the drawing of the entire keyboard.
2. The method for implementing a cross-platform cloud keyboard according to claim 1, characterized in that, The keyboard protocol includes the standardization of keyboard key codes. The standardized keyboard is based on the 108-key Windows full keyboard, plus Mac-specific keys, mouse buttons, scroll wheel buttons, and gamepad buttons. The Mac-specific keys include the Command key, Option key, Control key, Shift key, and Fn key. The mouse buttons include the left, right, and middle mouse buttons. The scroll wheel buttons include the up and down buttons, with the up button indicating scrolling upwards and the down button indicating scrolling downwards. The gamepad buttons include the directional buttons on the gamepad.
3. The method for implementing a cross-platform cloud keyboard according to claim 2, characterized in that, In the 108 keys of the Windows full keyboard, the left Ctrl key and right Ctrl key, the left Shift key and right Shift key, and the left Alt key and right Alt key are all distinguished.
4. The method for implementing a cross-platform cloud keyboard according to claim 1, characterized in that, The keyboard protocol includes standardization of key position, key size, and key transparency. The method is as follows: For key size, `size` defines the size of each key, with values from 1 to 10 representing the smallest to the largest, and the `size` value is set according to different key types. For key transparency, `alpha` defines the transparency of each key, with values from 0 to 1.0f representing completely transparent to completely opaque, and the `alpha` value is set as needed. For key position, for mobile devices, the entire screen of the mobile device is used as the keyboard's base. The ratio of the key's center to the left edge of the screen to the width of the screen is used to obtain the key's X-axis proportion `centerx`, and the ratio of the key's center to the top edge of the screen to the height of the screen is used to obtain the key's Y-axis proportion `centery`. `centerx` and `centery` values range from 0 to 1.0, with `centerx` closer to 0 indicating the key is closer to the screen. For mobile devices, the closer the centery value is to 1, the closer the key is to the right side of the screen. A centery value closer to 0 indicates the key is closer to the top of the screen, and a centery value closer to 1 indicates the key is closer to the bottom of the screen. This method displays the keys on mobile screens. For PCs, a fixed area at the bottom center of the PC screen is used as the keyboard base. The ratio of the distance from the center of the key to the left edge of the fixed area to the width of the fixed area is used to obtain the key's X-axis ratio, centerx. The ratio of the distance from the center of the key to the top edge of the fixed area to the height of the fixed area is used to obtain the key's Y-axis ratio, centery. centerx and centery values range from 0 to 1.
0. A centerx value closer to 0 indicates the key is closer to the left side of the screen, a centery value closer to 1 indicates the key is closer to the right side of the screen, and a centery value closer to 0 indicates the key is closer to the top of the screen, a centery value closer to 1 indicates the key is closer to the bottom of the screen. A resolution of 960×540 pixels is used to display the keyboard on the PC screen.
5. The method for implementing a cross-platform cloud keyboard according to claim 1, characterized in that, The keyboard protocol includes distinguishing key types: key types are distinguished by type, mainly divided into ordinary keyboard keys, mouse keys, scroll wheel keys, and gamepad keys. type 0 indicates ordinary keyboard type, type 1 indicates mouse and scroll wheel type, and type 2 indicates gamepad type. For regular keyboard buttons, key information is stored using `commands`, custom key names are stored using `keyname`, and press type is used to distinguish press types. Press types are divided into instantaneous and locked types. Instantaneous buttons are those that respond only after being pressed, while locked buttons remain pressed. For mouse buttons and scroll wheel buttons, `mousetype` is used to distinguish between mouse buttons and scroll wheel buttons. `mousetype` 0 represents the left mouse button, `mousetype` 1 represents the right mouse button, `mousetype` 2 represents the middle mouse button, `mousetype` 3 represents the scroll wheel up button, and `mousetype` 4 represents the scroll wheel down button. For gamepad buttons, `handshandktype` distinguishes between directional keys, and `operationtype` distinguishes between button operation types. Button operation types are divided into drag-and-drop and press-and-drop.
6. The method for implementing a cross-platform cloud keyboard according to claim 1, characterized in that, The keyboard protocol uses JSON format, with "name" storing the keyboard name, "gamepad" array storing multiple keyboards for the user, and "body" array storing multiple key information for each keyboard.
7. The method for implementing a cross-platform cloud keyboard according to claim 1, characterized in that, The keyboard usage methods include: when a user presses a key, determining the key type based on the keyboard protocol; if the key is a regular keyboard key, determining whether it is an instant or locked key; if it is a locked key, processing the selection effect and then sending the corresponding key information; if the key is a mouse key, sending the corresponding mouse event; if the key is a scroll wheel key, sending the corresponding scroll wheel event; if the key is a gamepad key, sending the corresponding gamepad information based on the gamepad key type and key operation type.
Citation Information
Patent Citations
Method and system for customizing virtual keyboard of electronic terminal
CN103513896A