ref: 99f6620b2cbfab36556a4c2d6c7a0f428fbe268d
parent: 3072c52be3829a018ff09dfcd36ffb54c2bed9bd
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Mon Feb 15 05:47:58 EST 2021
use "enter" key to enter color hex values
--- a/picker.c
+++ b/picker.c
@@ -575,6 +575,8 @@
color = c->next;
redraw();
break;
+ case '\n':
+ goto enter;
}
break;
@@ -653,6 +655,7 @@
break;
}
}else if(m.buttons == 2){
+enter:
strcpy(buf, hex);
if(enter("rgb(a):", buf, sizeof(buf), mctl, kctl, nil) > 0){
u = c->u;
--- a/picker.man
+++ b/picker.man
@@ -51,7 +51,7 @@
.PP
Switching between colors in the palette can be done by either a mouse
click, or left/right arrows on the keyboard. With the middle button
-click you can enter color as
+click (or 'enter' key) you can enter color as
.I RGB(A)
manually.
.PP