summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.c b/main.c
index ac5fcc4..6d9e046 100644
--- a/main.c
+++ b/main.c
@@ -116,8 +116,16 @@ int main(void) {
case SDLK_DOWN:
buffer_cursor_move_down(&text_buffer);
break;
+ case SDLK_RETURN:
+ //buffer_insert_text_at_cursor(buffer, U"\n", 1);
+ break;
}
} break;
+ case SDL_TEXTINPUT: {
+ char *text = event.text.text;
+ printf("TEXT: %s\n",text);
+ buffer_insert_utf8_at_cursor(&text_buffer, text);
+ } break;
}
}