- Clone this repository or download the source code.
- Open the
KeyFilter.swift
file in a text editor and set thetargetKeyCode
to the key code you want to filter. For example, 38 is for the "j" key.let targetKeyCode: CGKeyCode = 38 // Change this to set the targeted key. 38 is for "j"
- Save the file and close the text editor.
- Open Terminal and navigate to the directory containing the source code.
- Compile the Swift code:
swiftc -o RemoveDoublePresses.app/Contents/MacOS/RemoveDoublePresses KeyFilter.swift
- Move the
Info.plist
file toRemoveDoublePresses.app/Contents/
:mv Info.plist RemoveDoublePresses.app/Contents/
- Double-click
RemoveDoublePresses.app
to run or useopen RemoveDoublePresses.app
from Terminal.
The app needs accessibility permissions to monitor key events. On the first run, it will ask for the necessary permissions.