Use your smartphone to type any text (including chinese!) to your PC.
This is a server which enables remote devices to input UTF-8 text to desktop applications as if it were typed from the local keyboard.
A use case would be to directly use a smartphone as a remote handwriting pad to write chinese/japanese characters. It also works well as voice input method if the device supports it.
Clients use Socket.IO to send text input to the server, which in turn write the text using either:
xdotool
(Linux only): simulate keyboard input- or the system clipboard + paste command (
Ctrl/Cmd
+V
) on Windows and Mac (the latter is untested)
On Linux, you can force the clipboard mode by setting the env variable TA_USE_CLIPBOARD
(this still uses xdotool
for the paste command).
- Node.js
And:
- on Linux:
xdotool
- on Windows or Mac:
- nothing special (uses PowerShell / AppleScript)
npm install --global type-away
Then:
-
on Linux:
sudo apt-get install xdotool
-
Launch the server:
type-away
-
It will output something like:
Listening on http://192.168.0.15:3000
-
From a remote device (smartphone), open a browser and navigate to the given url (or scan the QR code)
-
Input your text into the webpage
The text is now written to the focused application.
When trying to open the url on the other device, it shows a blank page, but loads fine on the same computer
Configure your firewall to allow TCP
connections on port 3000
.
Example with ufw
(Linux firewall):
sudo ufw allow 3000/tcp
If building on Windows, set shell to Git Bash for npm scripts:
npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
MIT