shithub: microui

Download patch

ref: ae610b9d4c0fff7227cd9d4ea94122167eb23cf6
parent: 05178ae202fb620c3397fe8db5578186edec1d59
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Jan 4 16:29:47 EST 2020

rename ctrl_u to nack

--- a/demo/plan9.c
+++ b/demo/plan9.c
@@ -109,7 +109,7 @@
 			case Kshift: nkey = MU_KEY_SHIFT; break;
 			case Kbs: nkey = MU_KEY_BACKSPACE; break;
 			case '\n': nkey = MU_KEY_RETURN; break;
-			case Knack: nkey = MU_KEY_CTRL_U; break;
+			case Knack: nkey = MU_KEY_NACK; break;
 			case Kesc: mu_set_focus(ctx, 0); break;
 			default:
 				if (key < 0xf000 || key > 0xffff) {
--- a/src/microui.c
+++ b/src/microui.c
@@ -782,7 +782,7 @@
       buf[len] = '\0';
       res |= MU_RES_CHANGE;
     }
-    if (ctx->key_pressed & MU_KEY_CTRL_U && len > 0) {
+    if (ctx->key_pressed & MU_KEY_NACK && len > 0) {
       buf[0] = '\0';
       res |= MU_RES_CHANGE;
     }
--- a/src/microui.h
+++ b/src/microui.h
@@ -111,7 +111,7 @@
   MU_KEY_ALT          = (1 << 2),
   MU_KEY_BACKSPACE    = (1 << 3),
   MU_KEY_RETURN       = (1 << 4),
-  MU_KEY_CTRL_U       = (1 << 5),
+  MU_KEY_NACK         = (1 << 5),
 };