Jacopo De Simoi
998cc7ba6c
Be more lenient with compose+shift
6 years ago
Rouven Spreckels
d8dbbf8a25
Add '-f' flag (implied by '-d' flag).
9 years ago
Paul Porfiroff
48171b2443
Allow specifying keys to map to with keycodes.
9 years ago
Paul Porfiroff
ac6e3723f5
Fix typo.
9 years ago
orestisf
853ca153fe
Remove useless timeout_valid flag
...
It's always true.
9 years ago
orestisf
ccf79e6118
Fix #50 . Exit on invalid '-t' argument
...
Since the program has a default timeout anyway the '-t' flag is not needed.
9 years ago
Albin Olsson
f69c5a3f2b
Fix #51 . Clicking the mouse should prevent key press generation.
11 years ago
Albin Olsson
f3802fc086
Better error messages, fix #25
11 years ago
Albin Olsson
6d74db30c2
Call XInitThreads and XLock/UnlockDisplay, should fix occasional shutdown crashes.
11 years ago
Albin Olsson
9bb6416fa3
Bump copyright year
11 years ago
Albin Olsson
a55e3e90cd
Clean up on exit. Now runs cleanly with valgrind.
11 years ago
Albin Olsson
84e976c167
Make code follow C89 standard
11 years ago
David Shepherd
efb3292a58
Revert "Change to using KeySyms rather than keycodes to store to-keys"
...
This reverts commit b1f0a0601b .
13 years ago
David Shepherd
b1f0a0601b
Change to using KeySyms rather than keycodes to store to-keys
...
Modify all code to store and manipulate KeySyms instead of KeyCodes for
output key data.
Incomplete in two places (both also noted by comments in the code):
* When creating the additional key press events I have not yet implemented
the switch to using `XSendEvent` rather than `XTestFakeKeyEvent`. Instead
I just convert back to a keycode assuming zero shift level and
group. This gives the same behaviour as before.
* When checking that an event is not one that we generated I haven't managed
to figure out how to get the keysym of the event from the data provided
by X. Instead I compare the key codes for now, which will work until the
above issue is fixed.
13 years ago
David Shepherd
9c460f46c7
Add debugging output in key map creation
...
Requires the addition of a debug flag to `parse_mapping` and `parse_token`.
For some reason there is no declaration of the function `parse_token`. I'm
not sure why so I won't add it.
13 years ago
joetw
478e6077c5
'#'-prefix syntax
13 years ago
joetw
19740b571f
A bit more robust. Readme.
13 years ago
joetw
6829bf3d30
minor cleanup
13 years ago
joetw
9b6733cf18
[ #17 ]: Allowing keycodes in map expressions.
13 years ago
Roman Kamyk
82debc8d67
Fixed broken escape char
13 years ago
Roman Kamyk
4932b18a67
Introduced check if XOpenDisplay is successful. It fails when DISPLAY is not set in ENV,
...
and caused segfault on later invocations that used self->data_conn or self->ctrl_conn.
13 years ago
Albin Olsson
b8b353c43b
Fix debug message
13 years ago
Otto Modinos
c0621e486c
changed to use XkbKeycodeToKeysym
...
It looks like XKeycodeToKeysym is depreceated, so use the Xkb one instead
13 years ago
Alex Roper
ce1dde140c
Fixed crash when there is no keycode associated with the to of a mapping's keysym.
14 years ago
Alex Roper
071788b544
Fixed issue where when given an invalid map like 'Control_L' or 'Control_L=Escape;Control_R' it would add a mapping from that key to NULL list of to keys. Now it will simply skip over the mapping with no to and print a WARNING that the statement has no effect to stderr. Also, where before if only nop mappings were provided the program would still run/fork into the background; it now will only run if at least one mapping with an effect is provided.
14 years ago
Albin Olsson
b5754220b1
Fix uninitialized pointer.
14 years ago
Albin Olsson
3f5fea67b2
Better debug output.
14 years ago
Albin Olsson
0396399d74
Don't deamonize until parse was successful.
14 years ago
Albin Olsson
9c82999693
Make timeout configurable.
14 years ago
Albin Olsson
02cba592cf
Fix recursive mapping problem.
14 years ago
Albin Olsson
3def877795
More pedantery
14 years ago
Albin Olsson
c08fb06ead
Pedantic reformatting of code. No real change.
14 years ago
Alexander Polakov
af3058d5ee
It's possible to bind multiple keys to one.
...
Syntax is like this: Shift_L=Shift_L|parenleft
14 years ago
Alexander Polakov
5a46095f2a
Use strsep() instead of strtok().
14 years ago
Alexander Polakov
a822976d64
Inform user when parsing failed
14 years ago
Alexander Polakov
7e7c7a12cf
Add support for different keys. First commit of many.
14 years ago
Alexander Polakov
4bd73c2484
Switch to getopt
14 years ago
Albin Olsson
8144c425b8
Adding a timeout after 650ms when holding CTRL, after which xcape will not generate Escape if released. Thanks to Richard for the suggestion.
14 years ago
Albin Olsson
3da651d4fa
Fix issue #5 , Ctrl should not act as Esc when mouse buttons are involved
14 years ago
Albin Olsson
3ac4fba40e
Fix signal handling. Only need to listen for SIGINT and SIGTERM.
14 years ago
Olle
df192dd426
Use XkbKeycodeToKeysym for each key pressed.
...
Uses the above command for comparing the key pressed instead of using a
fixed Control key. Should fix issues where for instance Caps Lock is
also bound to Control using
> setxkbmap -option ctrl:nocaps
or similar commands.
14 years ago
Albin Olsson
231fb93fd8
Removed unnecessary include statement.
14 years ago
Albin Olsson
7a396a4fac
First commit
14 years ago