Commit Graph

100 Commits

Author SHA1 Message Date
Hiltjo Posthuma 3dfb00ccf8 fix comment style 2023-02-05 11:25:46 +01:00
Justin Torres 5dd14703ed Fix color scheme editing on smiley with Xresources
Fixes a small oversight that was preventing the colors of the smiley on q from changing with Xresources.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-10-09 10:29:10 +02:00
Hiltjo Posthuma 6a14319331 change comment-style in .c file 2021-07-12 12:51:52 +02:00
Maarten van Gompel 2164466746 protection against segfault if overlay has more keys than the keyboard itself 2021-07-12 12:33:44 +02:00
Maarten van Gompel b70948b74c exclude certain modifier keys and basic keys from being overlayed
This ensures that modifiers like shift/ctrl can be correctly used with the overlay.
2021-07-12 12:33:39 +02:00
Hiltjo Posthuma 4c9182636c no need to initialize these variables here 2021-07-03 11:45:15 +02:00
Hiltjo Posthuma 2a2acdacaa small code-style changes 2021-07-03 11:45:05 +02:00
Hiltjo Posthuma 81c96cec89 check key for NULL dereference, just in case
This matches the check pattern in other parts of the code.
2021-07-03 11:44:18 +02:00
Hiltjo Posthuma 34e5659db8 remove unused variable 2021-06-13 23:19:45 +02:00
Maarten van Gompel a5cb7d53ce increase spacing, set scheme for window, make window render faster by removing unnecessary map requests to X 2021-06-13 23:15:39 +02:00
Maarten van Gompel 2a84ae50f9 adding dead spacing between keys to prevent misclicks and adapting keyboard layout to a less rigid grid (all aimed to reduce typos) 2021-06-13 23:15:32 +02:00
Hiltjo Posthuma 2306b8eb40 remove unneeded initialization to zero
This removes a warning when compiling with -Wall (tested with clang 11.1.0).
2021-06-13 22:35:16 +02:00
silver 34530800bb Fix error in >1 wide key width calc, also 2021
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-06-13 22:33:11 +02:00
Max Schillinger 42380f62eb allow neutralizing a key modifier by applying the same modifier again
svkbd allows you to create keys for symbols of the second (=shift) layer by defining them with a modifier included, like:

    { "|", "|", XK_backslash, 1, XK_Shift_L },

This key creates a pipe symbol by sending shift + backslash. But unfortunately, this way you can't emit get the original symbol (backslash) anymore. So you still need a separate key for typing a backslash, wasting precious space on the screen.

The appended patch fixes this by allowing to neutralize the shift by tapping this key with shift. It works both by tapping first shift, then the pipe key on the on-screen keyboard, or by clicking the pipe key with the middle mouse button (assuming XK_Shift_L is set as the button 2 mod).

This way you can create a "flipped" backslash/pipe key:

    { "|", "\\", XK_backslash, 1, XK_Shift_L },

This patch works equally for AltGr symbols in a `de`-based layout. For example:

    { "~", "+", XK_plus, 1, XK_ISO_Level3_Shift },

(In the German QWERTZ layout, you enter "~" with AltGr-"+".)

Best regards,
Max

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-06-13 22:33:03 +02:00
Hiltjo Posthuma 4c4a085580 code-style 2021-03-28 15:24:42 +02:00
Hiltjo Posthuma d509e189d4 usage already exits, remove exit(2)
This now exits with the same status 1.
Document exit status in the man page.
2021-03-28 15:19:38 +02:00
Hiltjo Posthuma c91cf4a12a rm unused variables 2021-03-28 15:12:30 +02:00
Hiltjo Posthuma 1cc5f87511 usage: add -g information entry and fix newline after -H option 2021-03-28 15:10:40 +02:00
Hiltjo Posthuma d6026943d3 improve command-line parsing, fix crash with -fn without argument
Print the usage information instead of silently continuing.
On an invalid argument print the invalid argument and usage.
2021-03-28 15:05:56 +02:00
Hiltjo Posthuma 55de8b5184 comment style 2021-03-28 15:03:09 +02:00
Hiltjo Posthuma 7c06a0caf5 code-style changes 2021-03-28 15:02:25 +02:00
Hiltjo Posthuma 8f6a7b5e42 use sizeof(buffer) instead of hardcoded 32 2021-03-28 14:58:19 +02:00
Hiltjo Posthuma 4b5a61b275 add check for debug flag in printdbg() function itself 2021-03-28 14:56:05 +02:00
Hiltjo Posthuma 7980cb5f51 estrdup errors out, so remove the condition 2021-03-28 14:52:03 +02:00
Hiltjo Posthuma 9c492b6913 some code-style changes 2021-03-28 14:51:00 +02:00
Hiltjo Posthuma ea4b058833 fix unnecesary c99-ism, fixes compilation on OpenBSD using gcc 2021-03-28 14:42:38 +02:00
Hiltjo Posthuma d19a80dfe5 put estrdup in util and use die() instead of BSD err() 2021-03-28 14:41:32 +02:00
Maarten van Gompel b80819aa3f Various indentation fixes for a more consistent style 2021-03-28 14:39:58 +02:00
Maarten van Gompel 02f13a74c3 ternary operator was used in the wrong order 2021-03-28 14:39:51 +02:00
Maarten van Gompel f2322e9c0e Added a util function estrdup() to check all memory allocations 2021-03-28 14:39:45 +02:00
Maarten van Gompel 2fa04e74fe fixed double free error 2021-03-28 14:35:01 +02:00
Maarten van Gompel 444ceabde3 cleanup and reworking some of the logic 2021-03-28 14:35:01 +02:00
Maarten van Gompel a43bf5c4c1 fix for output key on release 2021-03-28 14:35:01 +02:00
Reed Wade 7a6742e6e4 fix the highlighted key on dragged touch
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-28 14:35:01 +02:00
tetrakist 8c28fd15f3 Add Xresources support.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-28 14:35:01 +02:00
Maarten van Gompel 869a4328c9 fixed print output mode 2021-03-28 14:35:01 +02:00
Maarten van Gompel 72b936baf6 Allow toggling modifier keys even when an overlay is displayed 2021-03-28 14:35:01 +02:00
Maarten van Gompel bd3620acf4 fix for earlier overlay width patch (there was a conflict with multirow overlays) 2021-03-28 14:35:01 +02:00
Maarten van Gompel c2251315e5 Simpler implementation for keeping track overlay keys (solution by stacy) 2021-03-28 14:35:01 +02:00
Maarten van Gompel 174c86d8fa Implemented key output option to stdout 2021-03-28 14:35:01 +02:00
Maarten van Gompel d06db9eb4f Added a second key label for the shift-activated symbols 2021-03-28 14:35:01 +02:00
Reed Wade 6633915997 Usefull if you want to skip somekeys that you want still displayed under the overlay.
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-28 14:35:01 +02:00
Reed Wade d10af923a3 Extended key definition to allow setting explicit symbol for shift modifier.
This allow key definitions as :

{ "?", XK_slash, 1, XK_Shift_L },

Which will press <S-/> wich output `?`

Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-28 14:35:01 +02:00
Maarten van Gompel 3be1e21c9f Implementing a print output mode and ability to not simulate keypresses for X 2021-03-28 14:35:01 +02:00
Maarten van Gompel e9208cb088 Applied different styling to overlays 2021-03-28 14:35:01 +02:00
Maarten van Gompel 6dc8c78b82 Implemented press-on-release and repetition after delay (the latter only for keys without overlay) 2021-03-28 14:35:01 +02:00
Maarten van Gompel 9fd94b637a Removed grid drwawing and set different slightly theme for abc keys 2021-03-28 14:35:01 +02:00
Maarten van Gompel 6f3308b327 Added an extra row to the mobile-intl layout for numbers/punctuation, reshuffling some keys, added navigation layer and disabled the functions layer 2021-03-28 14:35:01 +02:00
Maarten van Gompel 1fff13a1b4 fixed a bug that reset the layer to layer one after hiding the overlay 2020-12-11 18:25:53 +01:00
Hiltjo Posthuma 0bd17df5ed a few more tweaks 2020-08-05 00:09:41 +02:00