forked from wertarbyte/triggerhappy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0cedab
commit 0b3037c
Showing
24 changed files
with
118 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <errno.h> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
int bind_cmdsocket(char *name); | ||
struct command *read_command(int cmd_fd); | ||
int send_command(int cmd_fd, enum command_type type, char *param, int passfd, int exclusive, char *tag); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include "devtag.h" | ||
#define TH_COMMAND_PARAM_LENGTH 256 | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <unistd.h> | ||
#include <stdlib.h> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include "devtag.h" | ||
|
||
typedef struct device { | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#define TH_DEVICE_TAG_LENGTH 256 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <stdlib.h> | ||
#include <linux/input.h> | ||
#include <string.h> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <linux/input.h> | ||
|
||
const char *lookup_event_name_i(const int evtype, const int evcode); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <linux/input.h> | ||
|
||
#define EV_MAP( N ) [ N ] = #N | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include "ignore.h" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
typedef struct ignore { | ||
int code; | ||
struct ignore *next; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <linux/input.h> | ||
#include <stdlib.h> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <linux/input.h> | ||
typedef unsigned short keystate_holder[KEY_MAX+1]; | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include "devices.h" | ||
#include "command.h" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
int obey_command( struct command *cmd ); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <stdlib.h> | ||
#include <stdio.h> | ||
#include <errno.h> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* thd.c - the triggerhappy daemon | ||
* by Stefan Tomanek <[email protected]> | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
void cleanup(void); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <string.h> | ||
#include <ctype.h> | ||
#include <stdio.h> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include "devtag.h" | ||
#define TRIGGER_MODIFIERS_MAX 5 | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <string.h> | ||
#include <ctype.h> | ||
#include <stdio.h> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
trigger* parse_trigger(char* line); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <string.h> | ||
#include <unistd.h> | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* Copyright 2010 Stefan Tomanek <[email protected]> | ||
* You have permission to copy, modify, and redistribute under the | ||
* terms of the GPL. For full license terms, see COPYING. | ||
*/ | ||
|
||
int open_uinput(const char *path); | ||
void close_uinput(); | ||
int send_event(const int type, const int code, const int value); |