<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Saad</title>
    <description>The latest articles on DEV Community by Saad (@-saad).</description>
    <link>https://dev.to/-saad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3356976%2F13182350-c568-4078-807c-7e5bd7f09e76.png</url>
      <title>DEV Community: Saad</title>
      <link>https://dev.to/-saad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/-saad"/>
    <language>en</language>
    <item>
      <title>What I got wrong building Kimetra, a keyboard and mouse library for Node.js</title>
      <dc:creator>Saad</dc:creator>
      <pubDate>Tue, 17 Nov 2026 12:58:10 +0000</pubDate>
      <link>https://dev.to/-saad/what-i-got-wrong-building-kimetra-a-keyboard-and-mouse-library-for-nodejs-3c59</link>
      <guid>https://dev.to/-saad/what-i-got-wrong-building-kimetra-a-keyboard-and-mouse-library-for-nodejs-3c59</guid>
      <description>&lt;p&gt;Kimetra is a keyboard and mouse automation library for Node.js. It presses keys, types text, moves the pointer, clicks and scrolls by calling the OS input APIs directly: &lt;code&gt;SendInput&lt;/code&gt; on Windows, &lt;code&gt;CGEvent&lt;/code&gt; on macOS and &lt;code&gt;uinput&lt;/code&gt; on Linux. I published 1.0.0 in June 2025 and 2.2.0 in October 2026, and a lot of the time in between went into finding out what my own code didn't do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version 1 worked on my machine
&lt;/h2&gt;

&lt;p&gt;I started it because of installs. The libraries I had used built a native addon during &lt;code&gt;npm install&lt;/code&gt;, so every machine needed Python 3 and a C++ toolchain before a single key got pressed. I wanted &lt;code&gt;npm i&lt;/code&gt; to compile nothing. Kimetra ships prebuilt binaries for each platform, and a post-install step deletes the ones your machine can't use, so it ends up at 188 KB with no dependencies.&lt;/p&gt;

&lt;p&gt;Version 1 was keyboard only, and without meaning to I had written a Windows library. &lt;code&gt;ctrl&lt;/code&gt;, &lt;code&gt;shift&lt;/code&gt;, &lt;code&gt;alt&lt;/code&gt; and &lt;code&gt;meta&lt;/code&gt; only existed in the Windows key map, so on macOS and Linux, copy, paste and every other shortcut silently did nothing. macOS also threw away every event when the app running the script didn't have Accessibility permission, again without any error.&lt;/p&gt;

&lt;h2&gt;
  
  
  Moving Linux from X11 to uinput
&lt;/h2&gt;

&lt;p&gt;The first Linux backend used X11. On Wayland, input sent through X11 only reaches apps running under XWayland, and Ubuntu and Fedora both default to Wayland now. In March 2026 I deleted the X11 code and rewrote the Linux side on &lt;code&gt;uinput&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;uinput&lt;/code&gt; creates a virtual input device in the kernel, and apps see it as one more keyboard plugged in. That's why it works the same on X11 and Wayland. The downside is a one-time permission setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'KERNEL=="uinput", GROUP="input", MODE="0660"'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sudo tee /etc/udev/rules.d/99-kimetra.rules
sudo usermod -aG input &lt;span class="nv"&gt;$USER&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the permission is missing, Kimetra throws an error with these instructions in it. I wish more native packages did that.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;uinput&lt;/code&gt; has limits I haven't worked around yet. It sends scan codes, so &lt;code&gt;typeText&lt;/code&gt; on Linux can only type what a US QWERTY layout produces. It also can't see the screen, so absolute mouse moves aren't available on Linux. Relative moves, clicks and scrolling work.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 2.0 rewrite
&lt;/h2&gt;

&lt;p&gt;2.0.0 came out in August 2026. I called it a correctness release in the changelog, which was the polite way to say a lot of 1.x was broken. Some of what I found:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The ESM entry point used &lt;code&gt;require&lt;/code&gt;, so &lt;code&gt;import { Kimetra } from 'kimetra'&lt;/code&gt; threw every time. It had never worked.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wait&lt;/code&gt; inside a sequence read the wrong field and ignored its duration. Every wait slept 700 microseconds.&lt;/li&gt;
&lt;li&gt;A macro cleared itself after &lt;code&gt;exec()&lt;/code&gt;, so it could only run once.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pressKeys&lt;/code&gt; checked &lt;code&gt;delay&lt;/code&gt; instead of &lt;code&gt;interval&lt;/code&gt;, so the interval was never applied.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cleanup()&lt;/code&gt; did nothing, because no addon exported a &lt;code&gt;Cleanup&lt;/code&gt; function.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Nobody had opened a GitHub issue about any of these. That probably says more about how many people were using it than about the bugs.&lt;/p&gt;

&lt;p&gt;I also cut the API down. 1.x had aliases like &lt;code&gt;arrowUp&lt;/code&gt;, &lt;code&gt;altF4&lt;/code&gt;, &lt;code&gt;winKey&lt;/code&gt; and &lt;code&gt;taskManager&lt;/code&gt;, plus a whole &lt;code&gt;cmd*&lt;/code&gt; family. 2.0 exports &lt;code&gt;Kimetra&lt;/code&gt;, &lt;code&gt;Kimacro&lt;/code&gt; and &lt;code&gt;Key&lt;/code&gt;, and keys are plain strings that mean the same thing on every OS. There is now a test suite that runs in CI on all three platforms without sending a single key event.&lt;/p&gt;

&lt;p&gt;The change that did the most for speed was moving execution into the addon. Before 2.0, a three-key hotkey crossed from JavaScript into native code about thirteen times. Now a list of actions compiles into one flat buffer and runs as one native call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;ki&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;executeSequence&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'hotkey'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'alt'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'tab'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'wait'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;500000&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// microseconds by default&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'text'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Sequence text'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'key'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'enter'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'click'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'left'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  setTimeout was too slow for this
&lt;/h2&gt;

&lt;p&gt;Once batches ran natively, the waits between actions were the next problem. On Windows, &lt;code&gt;setTimeout&lt;/code&gt; is coarse. In my benchmark a 1 ms &lt;code&gt;setTimeout&lt;/code&gt; fired 14.5 ms late at the median.&lt;/p&gt;

&lt;p&gt;1.x busy-waited the last 100 ms of every wait, which keeps a CPU core at full load for those 100 ms. In 2.0 each wait computes an absolute deadline first, sleeps on the OS timer until 1.2 ms before it, then spins for the rest. Windows uses a high resolution waitable timer, Linux uses &lt;code&gt;clock_nanosleep&lt;/code&gt; and macOS uses &lt;code&gt;mach_wait_until&lt;/code&gt;. In the same benchmark, Kimetra's 1 ms wait was never more than 0.04 ms late.&lt;/p&gt;

&lt;p&gt;All of this is synchronous. The methods return promises so &lt;code&gt;await&lt;/code&gt; reads naturally, but a one second wait inside a sequence blocks the event loop for one second. Long pauses belong in JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it compares to robotjs and nut.js
&lt;/h2&gt;

&lt;p&gt;For 2.2 I wrote a benchmark that sends real input to a browser page. The page timestamps every event it receives and checks that it got exactly what was sent. The scenarios are typing a sentence, filling a form, a game macro with overlapping key holds, and a mouse workflow with glides, clicks, a drag and scrolling. These are medians of 3 runs on Windows 11, Node 22 and Chrome 152:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Timing error&lt;/th&gt;
&lt;th&gt;Time added&lt;/th&gt;
&lt;th&gt;Installed size&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Kimetra 2.2&lt;/td&gt;
&lt;td&gt;0.9 ms&lt;/td&gt;
&lt;td&gt;0.35 s&lt;/td&gt;
&lt;td&gt;188 KB, 1 package&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;robotjs 0.9.1&lt;/td&gt;
&lt;td&gt;11.0 ms&lt;/td&gt;
&lt;td&gt;1.66 s&lt;/td&gt;
&lt;td&gt;2.6 MB, 3 packages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;nut.js 4.2.6&lt;/td&gt;
&lt;td&gt;25.5 ms&lt;/td&gt;
&lt;td&gt;4.87 s&lt;/td&gt;
&lt;td&gt;28.6 MB, 125 packages&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Timing error is how far each gap between two events landed from the planned gap. Time added is the overhead on top of 15.6 seconds of scripted scenarios. nut.js here is the &lt;code&gt;@nut-tree-fork/nut-js&lt;/code&gt; package, and every library had its own built-in delays set to zero. Their defaults are 10 ms per event for robotjs and 300 ms per key for nut.js.&lt;/p&gt;

&lt;p&gt;All of that gap comes from running a whole scenario as one native call. If you call Kimetra one action at a time with &lt;code&gt;setTimeout&lt;/code&gt; in between, it lands at 10.6 ms, right next to robotjs. Raw throughput is the same for both, about 4,300 key taps a second, because that time is spent inside the OS.&lt;/p&gt;

&lt;p&gt;nut.js also does screen capture, image search and window management. Kimetra only sends input, which is how it stays this small, so if you need those features nut.js is the better pick. The drivers for each library are in the repo's &lt;code&gt;bench&lt;/code&gt; folder if you want to check how I called them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trying it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm install kimetra
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;Kimetra&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'kimetra'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// yes, this works now&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ki&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Kimetra&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;ki&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pressHotkey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'ctrl'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'c'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;ki&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;typeText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Hello from Kimetra'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;ki&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;moveMouseBy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;250000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// move right, gliding over 250 ms&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;ki&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;ki&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cleanup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is also a CLI, and a whole chain of commands compiles into one native call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx kimetra hotkey alt+tab &lt;span class="nb"&gt;wait&lt;/span&gt; 200 &lt;span class="nb"&gt;type&lt;/span&gt; &lt;span class="s2"&gt;"hi"&lt;/span&gt; key enter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On macOS, give Accessibility permission to whatever runs the script, such as Terminal, iTerm or VS Code. Windows needs no setup, but a normal process can't send input to a window running as administrator. Prebuilt binaries cover Windows x64 and ia32, macOS x64 and arm64, and Linux x64 and ia32 on Node 16 or newer. There is no linux-arm64 or Alpine build yet.&lt;/p&gt;

&lt;p&gt;Absolute mouse moves on Linux are the biggest gap left. If you know a clean way to get the pointer position under Wayland, I'd like to hear it in the comments or on GitHub.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/saad-devx/kimetra" rel="noopener noreferrer"&gt;https://github.com/saad-devx/kimetra&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;npm: &lt;a href="https://www.npmjs.com/package/kimetra" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/kimetra&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Project page and benchmarks: &lt;a href="https://saad.to/work/kimetra" rel="noopener noreferrer"&gt;https://saad.to/work/kimetra&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>showdev</category>
      <category>node</category>
      <category>automation</category>
      <category>opensource</category>
    </item>
    <item>
      <title>How To Do Keyboard Automation Easily (plug &amp; play using Kimetra)</title>
      <dc:creator>Saad</dc:creator>
      <pubDate>Tue, 15 Jul 2025 12:04:59 +0000</pubDate>
      <link>https://dev.to/-saad/how-to-do-keyboard-automation-easily-plug-play-using-kimetra-23lf</link>
      <guid>https://dev.to/-saad/how-to-do-keyboard-automation-easily-plug-play-using-kimetra-23lf</guid>
      <description>&lt;p&gt;Automation should be a breeze, not a headache of handling platform specific heavy dependencies and usage stuff. Yet for many developers, keyboard automation feels like navigating a minefield of bloated tools, platform-specific headaches, and APIs that seem designed to frustrate. Whether you’re trying to streamline your workflow, test an app, or just save yourself from repetitive strain injury, the last thing you need is a tool that adds more complexity to your life. Enter Kimetra: the keyboard automation library that cuts through the noise and gets the job done, super fast, very light, precision focused library.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Mess of Existing Tools
&lt;/h3&gt;

&lt;p&gt;Let’s talk about the competition or lack thereof. Robot.js? Deprecated to oblivion. AutoHotkey (AHK)? Its Windows only and, creepy usage, no pkg manager. Python via shell commands? Sure, if you enjoy wielding a bazooka to swat a fly. And Nut.js? Oh, bless its heart, it’s decent until you realize it demands 5 GB of Microsoft tools just to press a key. No thanks, Mister Bill Gates, I’m not signing up for that Trojan horse.&lt;/p&gt;

&lt;p&gt;Keyboard automation is a mess just to press a few keys, specially on Windows. Most tools are either outdated, bloated with dependencies, or just plain awkward. And cross-platform support? A pipe dream until now.&lt;/p&gt;

&lt;h3&gt;
  
  
  Meet Kimetra: Fast, Light, and Ready to Roll
&lt;/h3&gt;

&lt;p&gt;Check out Kimetra. It’s a cross-platform keyboard automation library for Node.js that works like a charm on Windows, macOS, and Linux. No Multi GB or even 1MB of dependencies, no creepy vibes just a lean, mean 100 KB package that’s faster and more precise than anything else out there. I built it as I was working on an automation script for myself and needed to press a few shortcuts, and trust me, it delivers.&lt;/p&gt;

&lt;p&gt;What does it do? Simple: it manipulates single keys, hotkeys, multiple keys, and even types full text with unicode support, all with microsecond delays/intervals precision. Need a complex sequence? Its macro system has your back. And it’s all wrapped in an API very simple and easy to use.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Use Kimetra
&lt;/h3&gt;

&lt;p&gt;Getting started is a easy. Install it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install kimetra
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Or check it out on npm:&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://www.npmjs.com/package/kimetra" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;npmjs.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;and you’re good to go. Here’s a taste of what it can do, straight from the README:&lt;/p&gt;

&lt;h2&gt;
  
  
  Press a Key
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { createKimetra, Key } = require('kimetra');
const kimetra = createKimetra();
await kimetra.pressKey(Key.enter);
kimetra.cleanup();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Type Some Text
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;await kimetra.typeText('Nobody cares 👀');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Build a Macro
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { createKimacro, Key } = require('kimetra');
const macro = createKimacro()
  .pressKey(Key.enter)
  .typeText('Automating all the things!')
  .pressHotkey([Key.ctrl, Key.s])
  .wait(1000);
await macro.execute();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;em&gt;Pro tip: for max performance, stick to the Kimetra class. Quick actions (like quickActions.typeText) are handy for one-offs but initialize and clean up every time, so they’re not ideal for heavy lifting.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Why You’ll Love It: Use Cases
&lt;/h2&gt;

&lt;p&gt;Keyboard automation tools like Nut.js are staples for all sorts of tasks, and Kimetra steps up to the plate with better speed and no baggage. Here’s where it shines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automated Testing: Simulate user input for desktop apps or websites.&lt;/li&gt;
&lt;li&gt;Accessibility: Build tools to assist users with disabilities.&lt;/li&gt;
&lt;li&gt;Workflow Hacks: Automate repetitive tasks and reclaim your day.&lt;/li&gt;
&lt;li&gt;Creative Projects: Whip up interactive art or entertainment setups.&lt;/li&gt;
&lt;li&gt;Security Testing: Mimic keyboard attacks to probe system defenses.&lt;/li&gt;
&lt;li&gt;Gaming: Craft custom macros with high speed and accuracy for that sweet edge.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Under the Hood: Speed Without the Junk
&lt;/h2&gt;

&lt;p&gt;How does Kimetra works ? It’s all about pre-compiled C++ Node addons that talk straight to each OS’s native keyboard APIs. I wrote utilities for Windows, macOS, and Linux, then set up GitHub pipelines to pre-compile binaries for every major architecture (x64, arm64, you name it). No runtime compilation, no bloated dependencies just raw speed and a tiny footprint. During install, it grabs only the binary you need and tosses the rest. Beautiful, right?&lt;/p&gt;
&lt;h2&gt;
  
  
  Give It a Spin
&lt;/h2&gt;

&lt;p&gt;If you’re fed up with slow, clunky, or downright ancient keyboard automation tools, Kimetra’s your ticket out. Grab it on npm or GitHub, play around, and please do share your thoughts on it.&lt;br&gt;
And please don’t forget to check it out and give a start to the repo if you like it:&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://www.npmjs.com/package/kimetra" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;npmjs.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;or the Github repository:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/saad-devx" rel="noopener noreferrer"&gt;
        saad-devx
      &lt;/a&gt; / &lt;a href="https://github.com/saad-devx/kimetra" rel="noopener noreferrer"&gt;
        kimetra
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Kimetra&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://badge.fury.io/js/kimetra" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/bf05aa78bda6930099c4a82a2ed71903a904d7b1d4c1ee41f6a7b5fa9aecbeb0/68747470733a2f2f62616467652e667572792e696f2f6a732f6b696d657472612e737667" alt="npm version"&gt;&lt;/a&gt;
&lt;a href="https://opensource.org/licenses/MIT" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667" alt="License: MIT"&gt;&lt;/a&gt;
&lt;a href="https://nodejs.org" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/86e5b05ed2226af08a5b199ba4e620a33c94a1b2ef68371d355c5786d7e9b301/68747470733a2f2f696d672e736869656c64732e696f2f6e6f64652f762f6b696d657472612e737667" alt="Node.js Version"&gt;&lt;/a&gt;
&lt;a href="https://github.com/saad-devx/kimetra#platform-support" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/a86bcdf24a8fc21dff57f585b9bdb74066fa5cd014212f8a86539885314d779a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d57696e646f77732532302537432532306d61634f532532302537432532304c696e75782d626c75652e737667" alt="Platform Support"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/saad-devx/kimetra/refs/heads/main/src/assets/banner.jpg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fsaad-devx%2Fkimetra%2Frefs%2Fheads%2Fmain%2Fsrc%2Fassets%2Fbanner.jpg" alt="Banner"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kimetra is a cross-platform keyboard automation library for Node.js. It's performance first library which focuses on max speed, precision with no external dependencies at all. It can be easily used for gaming macros as well as any automation tool and script.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Native Performance&lt;/strong&gt;: Direct OS API calls via highly optimized precompiled binaries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-Platform&lt;/strong&gt;: Seamless support for Windows, macOS, and Linux.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Complete Control&lt;/strong&gt;: Manipulate single &amp;amp; multiple keys, combinations, typing, and macros with maximum precision.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy &amp;amp; Light Weight&lt;/strong&gt;: Simple, intuitive API with less than &lt;strong&gt;&amp;lt; 100Kb&lt;/strong&gt; size and no external dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible&lt;/strong&gt;: Factory functions, quick actions, and a powerful chainable macro system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ultra-Fast &amp;amp; Precise&lt;/strong&gt;: Optimized for lightning-fast execution and &lt;strong&gt;microsecond-accurate&lt;/strong&gt; delays.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low-Level Access&lt;/strong&gt;: Direct access to platform-specific APIs and precise sleep functions.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How it works&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Kimetra uses Node addons built with C++ which uses the OS native APIs for every…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/saad-devx/kimetra" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
