{"action":"closed","issue":{"url":"https://api.github.com/repos/o11c/libtickit/issues/1","repository_url":"https://api.github.com/repos/o11c/libtickit","labels_url":"https://api.github.com/repos/o11c/libtickit/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/o11c/libtickit/issues/1/comments","events_url":"https://api.github.com/repos/o11c/libtickit/issues/1/events","html_url":"https://github.com/o11c/libtickit/issues/1","id":209122708,"number":1,"title":"It stops on C-c","user":{"login":"Bew78LesellB","id":9730330,"avatar_url":"https://avatars.githubusercontent.com/u/9730330?v=3","gravatar_id":"","url":"https://api.github.com/users/Bew78LesellB","html_url":"https://github.com/Bew78LesellB","followers_url":"https://api.github.com/users/Bew78LesellB/followers","following_url":"https://api.github.com/users/Bew78LesellB/following{/other_user}","gists_url":"https://api.github.com/users/Bew78LesellB/gists{/gist_id}","starred_url":"https://api.github.com/users/Bew78LesellB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bew78LesellB/subscriptions","organizations_url":"https://api.github.com/users/Bew78LesellB/orgs","repos_url":"https://api.github.com/users/Bew78LesellB/repos","events_url":"https://api.github.com/users/Bew78LesellB/events{/privacy}","received_events_url":"https://api.github.com/users/Bew78LesellB/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-21T11:53:19Z","updated_at":"2017-02-28T03:56:55Z","closed_at":"2017-02-28T03:56:55Z","body":"I tried to make the input example to quit on `M-q` so I can see if `C-c` can be used in an application, but it doesn't seems to work. when I press `C-c` once it does nothing, and when I press `C-c` a second time, the program stops..\r\n\r\nI'm on Archlinux:\r\n```\r\nLinux BB-8 4.9.8-1-ARCH #1 SMP PREEMPT Mon Feb 6 12:59:40 CET 2017 x86_64 GNU/Linux\r\n```\r\n\r\nThis is the modifications I did on the `example/demo-input.c` file:\r\n```diff\r\ndiff --git a/examples/demo-input.c b/examples/demo-input.c\r\nindex 476733b..6241d82 100644\r\n--- a/examples/demo-input.c\r\n+++ b/examples/demo-input.c\r\n@@ -8,9 +8,13 @@\r\n \r\n int still_running = 1;\r\n \r\n+TickitTerm * g_tt = NULL;\r\n+\r\n static void sigint(int sig)\r\n {\r\n-  still_running = 0;\r\n+  //still_running = 0;\r\n+  tickit_term_goto(g_tt, 0, 2);\r\n+  tickit_term_print(g_tt, \"blablabla C-c pressed!\");\r\n }\r\n \r\n static void render_modifier(TickitTerm *tt, int mod)\r\n@@ -47,6 +51,9 @@ static void render_key(TickitTerm *tt, TickitKeyEventType type, const char *str,\r\n   tickit_term_print(tt, str);\r\n   render_modifier(tt, mod);\r\n   tickit_term_erasech(tt, 30, -1);\r\n+\r\n+  tickit_term_goto(tt, 6, 4);\r\n+  tickit_term_print(tt, \"M-q to quit\");\r\n }\r\n \r\n static void render_mouse(TickitTerm *tt, TickitMouseEventType type, int button, int line, int col, int mod)\r\n@@ -82,7 +89,7 @@ static void event(TickitTerm *tt, TickitEventType ev, TickitEvent *args, void *d\r\n     break;\r\n \r\n   case TICKIT_EV_KEY:\r\n-    if(args->type == TICKIT_KEYEV_KEY && strcmp(args->str, \"C-c\") == 0) {\r\n+    if(args->type == TICKIT_KEYEV_KEY && strcmp(args->str, \"M-q\") == 0) {\r\n       still_running = 0;\r\n       return;\r\n     }\r\n@@ -101,6 +108,7 @@ int main(int argc, char *argv[])\r\n   TickitTerm *tt;\r\n \r\n   tt = tickit_term_new();\r\n+  g_tt = tt;\r\n   if(!tt) {\r\n     fprintf(stderr, \"Cannot create TickitTerm - %s\\n\", strerror(errno));\r\n     return 1;\r\n```\r\n\r\nDid I miss something ?"}}
{"actor":{"display_login":"o11c"}}