Commit graph

82 commits

Author SHA1 Message Date
Albin Olsson f69c5a3f2b Fix #51. Clicking the mouse should prevent key press generation. 2015-07-19 10:37:44 +02:00
Albin Olsson f3802fc086 Better error messages, fix #25 2015-03-01 08:57:41 +01:00
Albin Olsson 6d74db30c2 Call XInitThreads and XLock/UnlockDisplay, should fix occasional shutdown crashes. 2015-02-28 09:28:47 +01:00
Albin Olsson 9bb6416fa3 Bump copyright year 2015-02-27 19:11:15 +01:00
Albin Olsson a55e3e90cd Clean up on exit. Now runs cleanly with valgrind. 2015-02-27 19:10:51 +01:00
Albin Olsson 84e976c167 Make code follow C89 standard 2015-02-27 19:08:38 +01:00
alols 88f933ac5a Merge pull request #42 from phy1729/makefile-portability
Make Makefile more portable
2015-01-20 09:17:40 +01:00
Matthew Martin 59db9c6846 Make Makefile more portable
- Use -d instead of -D
- Add all target
- Mark install target as phony
2015-01-19 17:32:20 -06:00
alols c01ef4f2cf Merge pull request #36 from mar04/patch-1
Fix typo in man page.
2014-05-30 08:45:49 +02:00
Mariusz Libera d4ae3d74f6 Fix typo in man page. 2014-05-20 18:47:08 +02:00
Albin Olsson 8dc7b033bf Fix typo in README 2014-03-25 18:35:09 +01:00
alols 664a292d41 Merge pull request #30 from johnhill/manpage
Add manpage and update Makefile
2014-02-15 13:25:50 +01:00
John Hill 28fa283290 Add manpage and update Makefile 2014-02-13 19:03:06 +00:00
Albin Olsson 813713a0a9 Update README to avoid confusion on xcape's capabilities. 2014-01-22 23:32:00 +01:00
alols c8b4ec9b19 Merge pull request #27 from atykhonov/master
Fixed bad example
2014-01-18 04:36:02 -08:00
Andrey Tykhonov 3410230008 Used existed variable 2014-01-17 11:46:53 +02:00
Andrey Tykhonov f1c9869083 Fixed bad example 2014-01-17 01:53:19 +02:00
Albin Olsson eeb66320bb Add missing dependency to build instructions 2013-12-14 10:36:01 +01:00
Albin Olsson 5555d661ce Fix error in documentation. Issue #24 2013-12-05 22:09:11 +01:00
alols d5b4bbdee0 Merge pull request #23 from davidshepherd7/master
Improve instructions for emulating space2ctrl in readme
2013-11-25 23:52:32 -08:00
David Shepherd a58beb5569 Improve instructions for emulating space2ctrl in readme
In my old approach I bound space to a brand new keysym. This works well for
most programs but not for emacs! The problem is that emacs tries to warn
you when you press unbound keys, which causes slowdowns and odd behaviour.

The solution is to instead bind space to some unused modifier key that will
be recognised and ignored by emacs. I've found that "Hyper_L" works nicely.
2013-11-09 22:51:28 +00:00
alols 82014c8436 Merge pull request #22 from davidshepherd7/master
Additions to readme and debugging output during keymap creation
2013-09-26 11:42:40 -07:00
David Shepherd 51840b931e Add example: make space generate ctrl if held 2013-09-25 23:17:13 +01:00
David Shepherd efb3292a58 Revert "Change to using KeySyms rather than keycodes to store to-keys"
This reverts commit b1f0a0601b.
2013-09-25 23:00:51 +01:00
David Shepherd 08992b45d6 Modify readme to explain how to generate button presses with shift 2013-09-25 22:57:13 +01:00
David Shepherd 7ec9ffd5fa Convert numbered lists in readme to proper markdown lists 2013-09-25 22:06:05 +01:00
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.
2013-09-25 00:36:30 +01:00
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.
2013-09-25 00:26:03 +01:00
joetw 39aa08c5da Merge pull request #19 from joetw/keycode_in_mapexpression
Closes #17: Allowing keycodes in map expressions
2013-05-14 04:13:59 -07:00
joetw 58d973848a Readme: minor cleanup 2013-05-14 13:00:56 +02:00
joetw 65197d93d2 Readme cleared up a little 2013-05-12 18:16:14 +02:00
joetw 478e6077c5 '#'-prefix syntax 2013-05-11 21:42:46 +02:00
joetw 19740b571f A bit more robust. Readme. 2013-05-10 22:49:55 +02:00
joetw 6829bf3d30 minor cleanup 2013-05-10 18:49:00 +02:00
joetw 9b6733cf18 [#17]: Allowing keycodes in map expressions. 2013-05-09 23:18:49 +02:00
alols 6644670090 Merge pull request #14 from rkj/master
Please pull small bugfix/checking of initial conditions
2013-02-03 02:47:46 -08:00
Roman Kamyk 82debc8d67 Fixed broken escape char 2013-01-31 17:32:05 -08:00
Roman Kamyk a036bc5c9f Added gitignore 2013-01-31 17:31:54 -08:00
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.
2013-01-31 17:00:57 -08:00
Albin Olsson b8b353c43b Fix debug message 2012-12-14 18:30:23 +01:00
alols 2fa52dca29 Merge pull request #13 from otommod/master
Changed to use XkbKeycodeToKeysym
2012-12-14 09:20:45 -08:00
Otto Modinos c0621e486c changed to use XkbKeycodeToKeysym
It looks like XKeycodeToKeysym is depreceated, so use the Xkb one instead
2012-12-14 13:21:50 +02:00
alols b1b44f8d47 Merge pull request #12 from DexterTheDragon/master
Add pkg-config to build instructions in readme
2012-11-15 00:27:41 -08:00
Kevin Carter 41fd66988f Add pkg-config to list of dependencies to install 2012-11-13 12:05:55 -07:00
alols 039231d887 Merge pull request #10 from calmofthestorm/master
Fixed crash in handle_key when no keycode is found for a selected keysym
2012-11-05 23:07:45 -08:00
Alex Roper c5ff58dc47 Added warning to README 2012-10-25 16:05:24 -04:00
Alex Roper ce1dde140c Fixed crash when there is no keycode associated with the to of a mapping's keysym. 2012-10-25 15:49:51 -04:00
alols 2b159f4d7b Merge pull request #9 from calmofthestorm/master
Fix issue where it runs anyway if no non-nop mappings given and adds warning for nop mappings
2012-10-25 11:48:13 -07:00
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. 2012-10-25 14:16:31 -04:00
Albin Olsson b5754220b1 Fix uninitialized pointer. 2012-10-25 13:29:43 +02:00