From 2b383ce756047c6e8c6081731c65b176f0f957d5 Mon Sep 17 00:00:00 2001 From: Humza Shahid Date: Fri, 23 Jan 2026 15:09:43 +0000 Subject: [PATCH] change if statement in keyCallback (on C side) to a switch statement, so adding more cases becomes easier --- ffi/rgfw-export.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ffi/rgfw-export.c b/ffi/rgfw-export.c index 17385ac..9395af7 100644 --- a/ffi/rgfw-export.c +++ b/ffi/rgfw-export.c @@ -35,8 +35,10 @@ void writeClipboard(char* string, int stringSize) { void keyCallback(RGFW_window* window, unsigned char key, unsigned char symbol, unsigned char keymod, unsigned char repeated, unsigned char pressed) { if (pressed || repeated) { - if (key == RGFW_escape) { - mltonEscape(); + switch (key) { + case RGFW_escape: + mltonEscape(); + break; } } }