GitXplorerGitXplorer
a

Keymapper

public
3 stars
0 forks
2 issues

Commits

List of commits on branch master.
Unverified
c3fdd4217fa7073ccca40892cc13ae10f82b586c

Added some debugging information to the code.

aazihassan committed 9 years ago
Unverified
b23273d4d0a1a768348667db9c4280a8dfaf5e31

Removed compile-time loading of keys and added the executable path to startup

aazihassan committed 9 years ago
Unverified
6bf9100e6ab49e505a2b8db3abd89183182ce055

Removed a redundant header

aazihassan committed 10 years ago
Unverified
58413120e46f0e30235e30e46169cca9886146b0

Made a couple changes and added a README file.

aazihassan committed 10 years ago
Unverified
1a5171ae0618cb34542a9f6c6a6e82cde8524185

First commit

aazihassan committed 10 years ago

README

The README file for this repository.

Keymapper

A small utility that allows a keyboard key to produce another value if pressed for a certain amount of time.

This was inspired by the excelent DevKeyboard project : https://github.com/babin101/DevKeyboard

I wrote this utility as a temporary solution to a problem I've been having with my keyboard these past few days. Some keys would stop working for no apparent reason : TAB, S, 2 and a couple others. This program maps those keys to other buttons that actually work, allowing me to type S by maintaining Z pressed for a short amount of time : 150 milliseconds to be precise, but you can change that value by passing it as a first argument to the program.

I used DevKeyboard for a while but ended up deciding to just write my own program. The code is based on a keylogger I have been writing a while ago (just an experiment, nothing naughty), as it uses similar techniques to intercept the keys that are pressed. Because of this, this program may or may not be flagged by your antivirus.

The key mapping is supposed to be put in the keys.txt file. Recompiling would result into those keys being hard-coded into the program, thus making it work without the text file. But it is also possible to compile it with an empty keys.txt file and place the keys in it afterwards, and it will still work as expected.

The only reason why I added that feature (compile-time loading of keys) in the first place was because it was easier to parse that way.

About the Win32 API

Initially I wrote this program with the help of these bindings, but since I couldn't find said bindings on code.dlang.org, I simply put the functions/structs/enums I used inside a separate winapi.d file and imported that instead.

Usage

keymapper <interval in milliseconds>

The program runs in the background, you can close it by terminating the corresponding process in the Task Manager.