Skip to content

Commit

Permalink
Tweaks & typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Bleckley committed Mar 21, 2013
1 parent ccf798d commit e4c0886
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The default keycode (called *natural*) of the original key is mapped to the modi
The mapping is done by `xmodmap` and the *artificial* keycode generation by `keydouble`.


### Troubleshooting.
## Troubleshooting.

```Error! Option "-query" not recognized```

Expand Down
4 changes: 2 additions & 2 deletions kdlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ natart_pairs=$(grep -i '^![[:space:]]*natart_pairs:' "$KEYDOUBLE_CONF" | sed 's/
restore_map() {

# If setxkbmap has no query option, change lyt to your local layout;
# e.g. "us", 'fr", etc.

# e.g. "us", "fr", etc.
lyt=$(setxkbmap -query | grep -i '^layout:' | awk '{print $2}')

if [ -n "$lyt" ] ; then
setxkbmap -layout "$lyt"
else
Expand Down
5 changes: 2 additions & 3 deletions keydouble.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <X11/extensions/record.h>
#include <X11/keysym.h>

#define ARTIFICIAL_TIMEOUT 300
#define ARTIFICIAL_TIMEOUT 600
#define SLEEP_MICROSEC 100*1000
#define MAX_CODE 256
#define CODE_UNDEF -1
Expand Down Expand Up @@ -105,8 +105,8 @@ void setup(void)
void loop(void)
{
while (running) {
usleep(SLEEP_MICROSEC);
XRecordProcessReplies(datdpy);
usleep(SLEEP_MICROSEC);
}
}

Expand Down Expand Up @@ -137,7 +137,6 @@ void evtcallback(XPointer priv, XRecordInterceptData *hook)
for (i = 0; i < MAX_CODE; i++)
keycomb[i] = natdown[i];
}

} else if (evttype == KeyRelease) {
/* a natural key was released */
if (natart[code] != CODE_UNDEF) {
Expand Down

0 comments on commit e4c0886

Please sign in to comment.