autotype-rs 1.3.2 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,25 +2,55 @@
2
2
 
3
3
  Compact Rust typing app for **Windows x64** and **Linux x64**, supporting both
4
4
  **X11/Xorg** and **Wayland**. Adjustable delay (0.1–3600 seconds, default 2), custom
5
- header, and dark/light themes.
5
+ header, custom global Start/Stop shortcuts, instant start, and dark/light themes.
6
6
 
7
7
  ```sh
8
- npx autotype-rs@1.3.2
9
- bunx --bun autotype-rs@1.3.2
8
+ npx autotype-rs@1.5.0
9
+ bunx --bun autotype-rs@1.5.0
10
10
  # or install once:
11
- npm install -g autotype-rs@1.3.2
11
+ npm install -g autotype-rs@1.5.0
12
12
  autotype-rs
13
13
  ```
14
14
 
15
15
  Enter text, choose a delay, click **Start typing**, and focus your destination.
16
- On Wayland, click **Enable typing** and approve the desktop keyboard-control dialog
17
- first. Cancel or return to the app to stop; Escape works globally on Windows/X11
18
- and when the app is focused on Wayland. Windows/X11 stop if the destination window
19
- changes. Wayland cannot monitor other windows' focus, so changing destinations can
20
- redirect the remaining text.
21
-
22
- Wayland needs a desktop portal backend with RemoteDesktop keyboard-control support
23
- (compatible GNOME/KDE installations). Xwayland does not bypass that requirement.
16
+ On Wayland, click **Enable typing** and approve the desktop keyboard-control dialog.
17
+ Cancel works during approval and typing; returning to the app also stops typing.
18
+ Escape works globally on Windows/X11 and when focused on Wayland. Custom global
19
+ Start/Stop shortcuts are available in **Keys**.
20
+
21
+ Open **Keys** to enable and customize global shortcuts. Defaults are
22
+ **Ctrl+Shift+F6** (Start) and **Ctrl+Shift+F7** (Stop). Focus your destination and
23
+ release the full Start shortcut. Instant typing is available on Windows/X11 and
24
+ protected GNOME sessions. Other Wayland paths require your selected positive
25
+ countdown; release all shortcut keys before it ends. Clear **Start shortcut skips
26
+ the delay** to use the delay where Instant is supported; the regular Start button
27
+ still uses it.
28
+ Shortcuts are off until enabled. Shortcut settings are saved across launches;
29
+ entered text stays in memory.
30
+
31
+ On Wayland, the desktop chooses and approves your shortcuts in its dialog.
32
+ Global shortcuts also require a GlobalShortcuts portal backend; keyboard control
33
+ still needs **Enable typing**. The app displays the approved combinations.
34
+ **Change in desktop…** requires GlobalShortcuts version 2; with older versions,
35
+ disable and enable shortcuts to reassign them. Release the full shortcut before
36
+ typing. Portal closure or restart cancels typing and clears approved bindings;
37
+ enable shortcuts again to rebind. Wayland creates a hidden desktop entry for portal
38
+ identification.
39
+
40
+ Wayland's **Protect destination** defaults on, with adapters for GNOME, KDE Plasma,
41
+ Hyprland and Sway. GNOME needs the bundled companion extension; export it with
42
+ `autotype-rs --export-gnome-extension NEW_DIRECTORY`, then install and enable it as
43
+ explained in the [Wayland setup guide](https://github.com/Jeremiah-C27/autotype/blob/v1.5.0/docs/wayland.md).
44
+ KDE uses a temporary script. The guard stops on window changes or adapter failure;
45
+ it cannot protect individual fields/tabs or make checking and input atomic.
46
+ Explicitly disabling it allows destination changes to redirect the remaining text.
47
+ **Remember permission** saves only a private portal restore token, if the desktop
48
+ allows it. **Disconnect** closes the session and forgets the local token.
49
+
50
+ All four Wayland desktops still need a portal backend with RemoteDesktop
51
+ keyboard-control support. Focus adapters do not supply missing keyboard permission;
52
+ some Hyprland/Sway portal installations offer only screenshots/screencasts.
53
+ Xwayland does not bypass that requirement.
24
54
  Linux needs a graphical session, glibc 2.35+, OpenGL/EGL, libxkbcommon and, on X11,
25
55
  libxkbcommon-x11. On Debian/Ubuntu:
26
56
 
@@ -31,7 +61,8 @@ sudo apt install libgl1 libegl1 libxkbcommon0 libxkbcommon-x11-0
31
61
  No Rust compiler is required. Both executables are bundled; installation does not
32
62
  run an install script or download another binary. Node.js 18+ or Bun is required.
33
63
  The GUI runs independently of the terminal. `--help` and `--version` work without
34
- opening a window. Text stays in memory and is never uploaded or saved.
64
+ opening a window. Text stays in memory and is never uploaded or saved; only
65
+ opt-in permission restoration saves a private desktop token.
35
66
 
36
67
  For Proxmox/noVNC, match local/guest keyboard layouts and Caps Lock. Windows/X11
37
68
  use physical Shift for capitals; Unicode fallback may not work in remote consoles.
@@ -52,3 +83,17 @@ Native Linux builds need Rust and a C compiler. Native Windows builds need Rust
52
83
  and Visual Studio C++ tools. CI combines Ubuntu 22.04 and Windows builds into one
53
84
  package. Prepack validates both executable formats, metadata, hashes and Linux
54
85
  executable permissions. Registry publication requires npm sign-in.
86
+
87
+ ## Updating
88
+
89
+ Use the package manager rather than a separate app self-updater:
90
+
91
+ ```sh
92
+ npx autotype-rs@latest
93
+ bunx --bun autotype-rs@latest
94
+ # For a global npm install:
95
+ npm install -g autotype-rs@latest
96
+ ```
97
+
98
+ Explicit versions such as `@1.3.2` remain pinned. Close the app before replacing
99
+ its bundled executable. Standalone downloads are updated from GitHub releases.
package/lib/launcher.cjs CHANGED
@@ -17,7 +17,7 @@ function launch({
17
17
  setExitCode = (code) => { process.exitCode = code; },
18
18
  } = {}) {
19
19
  if (args.length === 1 && ['--help', '-h'].includes(args[0])) {
20
- stdout.write('autotype-rs\n\nOpens the Windows or Linux x64 typing app. Enter text, set the delay, click Start typing,\nthen click the destination field. On Wayland, enable keyboard control first.\n');
20
+ stdout.write('autotype-rs\n\nOpens the Windows or Linux x64 typing app. Enter text, set the delay, click Start typing,\nthen click the destination field. On Wayland, enable keyboard control first.\n\nUpdate a global install: npm install -g autotype-rs@latest\nRun the latest release: npx autotype-rs@latest or bunx --bun autotype-rs@latest\n\nLinux GNOME setup: autotype-rs --export-gnome-extension NEW_DIRECTORY\n');
21
21
  return;
22
22
  }
23
23
  if (args.length === 1 && ['--version', '-v'].includes(args[0])) {
@@ -28,7 +28,8 @@ function launch({
28
28
  stderr.write(`autotype-rs: ${message}\n`);
29
29
  setExitCode(1);
30
30
  };
31
- if (args.length !== 0) {
31
+ const exportGnome = args.length === 2 && args[0] === '--export-gnome-extension' && args[1].length > 0;
32
+ if (args.length !== 0 && !exportGnome) {
32
33
  fail('Unsupported arguments. Run autotype-rs --help for usage.');
33
34
  return;
34
35
  }
@@ -36,7 +37,11 @@ function launch({
36
37
  fail('This app requires x64 Windows or Linux.');
37
38
  return;
38
39
  }
39
- if (platform === 'linux' && !env.DISPLAY && !env.WAYLAND_DISPLAY) {
40
+ if (exportGnome && platform !== 'linux') {
41
+ fail('The GNOME extension export requires Linux.');
42
+ return;
43
+ }
44
+ if (!exportGnome && platform === 'linux' && !env.DISPLAY && !env.WAYLAND_DISPLAY) {
40
45
  fail('Run this app in a Linux desktop session (X11 or Wayland).');
41
46
  return;
42
47
  }
@@ -46,16 +51,17 @@ function launch({
46
51
  return;
47
52
  }
48
53
  try {
49
- const child = spawn(executable, [], {
50
- detached: true,
51
- stdio: platform === 'linux' ? ['ignore', 'ignore', 'inherit'] : 'ignore',
54
+ const child = spawn(executable, exportGnome ? args : [], {
55
+ detached: !exportGnome,
56
+ stdio: exportGnome ? 'inherit' : platform === 'linux' ? ['ignore', 'ignore', 'inherit'] : 'ignore',
52
57
  shell: false,
53
58
  });
54
59
  child.once('error', (error) => {
55
60
  fail(`Could not start the app (${error.code || 'unknown error'}).`);
56
61
  });
62
+ if (exportGnome) child.once('exit', (code, signal) => { setExitCode(signal ? 1 : (code ?? 1)); });
57
63
  child.once('spawn', () => {
58
- child.unref();
64
+ if (!exportGnome) child.unref();
59
65
  });
60
66
  } catch (error) {
61
67
  fail(`Could not start the app (${error.code || 'unknown error'}).`);
Binary file
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.2",
2
+ "version": "1.5.0",
3
3
  "target": "x86_64-unknown-linux-gnu",
4
- "sha256": "7043678d65baa17ab61944c732c53cb64a580052bbe0377a322186c1c2fa0863"
4
+ "sha256": "d0c6d7ecf8d0e3c578d1f7ff778bf67aa27291e9c17c31f8c7ab5641f49edf0b"
5
5
  }
Binary file
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.2",
2
+ "version": "1.5.0",
3
3
  "target": "x86_64-pc-windows-msvc",
4
- "sha256": "3966067df273532e810929240f36cb606359ce550f633176116998f54c798dc3"
4
+ "sha256": "131f2060dbb5e27802d9e8a642bcd7958e7ad5f09e832057ebf671ae767edba2"
5
5
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "autotype-rs",
3
- "version": "1.3.2",
4
- "description": "Compact Rust typing app for Windows and Linux X11/Wayland with adjustable delay and dark/light themes",
3
+ "version": "1.5.0",
4
+ "description": "Compact Rust typing app for Windows and Linux X11/Wayland with custom global hotkeys, instant start, adjustable delay and dark/light themes",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",