svkbd

simple virtual keyboard
git clone git://git.suckless.org/svkbd
Log | Files | Refs | README | LICENSE

commit 9fd94b637aea44fbbe0648585de120ad885ee9af
parent 6f3308b3275382e2109b0f0b81ecf637d7dc70ca
Author: Maarten van Gompel <proycon@anaproy.nl>
Date:   Fri,  5 Mar 2021 22:29:38 +0100

Removed grid drwawing and set different slightly theme for abc keys

Diffstat:
Mconfig.def.h | 3++-
Msvkbd.c | 7+++++--
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -7,7 +7,8 @@ static const char *fonts[] = { }; static const char *colors[SchemeLast][2] = { /* fg bg */ - [SchemeNorm] = { "#ffffff", "#14313d" }, + [SchemeNorm] = { "#bbbbbb", "#132a33" }, + [SchemeNormABC] = { "#ffffff", "#14313d" }, [SchemePress] = { "#ffffff", "#000000" }, [SchemeHighlight] = { "#58a7c6", "#005577" }, }; diff --git a/svkbd.c b/svkbd.c @@ -33,7 +33,7 @@ #define STRINGTOKEYSYM(X) (XStringToKeySym(X)) /* enums */ -enum { SchemeNorm, SchemePress, SchemeHighlight, SchemeLast }; +enum { SchemeNorm, SchemeNormABC, SchemePress, SchemeHighlight, SchemeLast }; enum { NetWMWindowType, NetLast }; /* typedefs */ @@ -285,10 +285,13 @@ drawkey(Key *k) drw_setscheme(drw, scheme[SchemePress]); else if (k->highlighted) drw_setscheme(drw, scheme[SchemeHighlight]); + else if ((k->keysym == XK_Return) || + ((k->keysym >= XK_a) && (k->keysym <= XK_z)) || + ((k->keysym >= XK_Cyrillic_io) && (k->keysym <= XK_Cyrillic_hardsign))) + drw_setscheme(drw, scheme[SchemeNormABC]); else drw_setscheme(drw, scheme[SchemeNorm]); drw_rect(drw, k->x, k->y, k->w, k->h, 1, 1); - drw_rect(drw, k->x, k->y, k->w, k->h, 0, 0); if (k->keysym == XK_KP_Insert) { if (enableoverlays) {