Created
June 24, 2015 15:29
-
-
Save etcwilde/4210455e8fb2584e049d to your computer and use it in GitHub Desktop.
Keyboard Utility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/io.h> | |
#include <stdio.h> | |
// Send data to keyboard | |
// This is for my IBM rapid access 1 keyboard media key support | |
// To activate all keys: | |
// | |
// sudo ./keyboard_send ea 71 | |
// | |
int main(int argc, char* argv[]) | |
{ | |
int i; | |
ioperm(0x60, 3, 1); | |
for (i = 1; i < argc; i++) | |
{ | |
int x = strtol(argv[i], 0, 16); | |
usleep(300); | |
outb(x, 0x60); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment