Skip to content

Draft: [Feature] Remote Keyboard

Abstract

Feature goal: implement a remote keyboard in the RemoteInput/Mousepad Plugin, design and functionality aims to be similar and familiar to the Android KDE Connect remote keyboard implementation.

Notes: due to API differences, the feature would be implemented differently on iOS 14 and iOS 15:

  • iOS 15: using @FocusState and ToolbarItemGroup(placement: .keyboard), both iOS 15/SwiftUI 3 exclusive properties, to implement activating the keyboard programmatically and to add special keys (ctrl, tab, alt, etc.)

  • iOS 14: using a visible textfield, which the user taps on, to trigger the keyboard. Not sure what to do with the special keys yet.

Updates

  • [Dec 17th, 2021] preliminary testing with the Qt client on Linux is working. Need to optimize the TextField implementation (Caps lock is always on, backspace doesn't work yet). Need to implement key combinations with special keys in the Toolbar.

  • [Feb 24th, 2022] needs to consider new approaches with listening to key events. Semi-hacky solution involving manipulating string inside a TextField is likely not the most optimal approach.

  • [March 5th, 2022] Swift has a number of APIs that handles keyboard inputs, but some are for hardware/external keyboards ONLY. The one we want (for on-screen keyboard) is UIKeyInput. It even allows us to build our own keyboard if we really want to (with all the special modifiers keys, etc.), though using toolbar on top is also an option. Here's a MIT-licensed example on Github. Still investigating how it's going to work.

Edited by Lucas Wang

Merge request reports