shithub: microui

Download patch

ref: 9149ed8d0e8923dfedd57ec9f4d17dc12745dc56
parent: 14d8cf017ece030b0ebe569239cc1fe93cabda7f
author: Sigrid Haflínudóttir <[email protected]>
date: Fri Jan 3 07:21:45 EST 2020

use Esc to remove focus

--- a/demo/plan9.c
+++ b/demo/plan9.c
@@ -109,7 +109,8 @@
 			case Kshift: nkey = MU_KEY_SHIFT; break;
 			case Kbs: nkey = MU_KEY_BACKSPACE; break;
 			case '\n': nkey = MU_KEY_RETURN; break;
-			case 0x15: nkey = MU_KEY_CTRL_U; break;
+			case Knack: nkey = MU_KEY_CTRL_U; break;
+			case Kesc: mu_set_focus(ctx, 0); break;
 			default:
 				if (key < 0xf000 || key > 0xffff) {
 					memset(text, 0, sizeof(text));