handle ctrl
authorJohn Tsiombikas <nuclear@member.fsf.org>
Thu, 2 Nov 2023 23:00:42 +0000 (01:00 +0200)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Thu, 2 Nov 2023 23:00:42 +0000 (01:00 +0200)
src/main.c

index 81c0f4d..9f986c4 100644 (file)
@@ -211,6 +211,10 @@ static void keypress(unsigned char key, int x, int y)
                }
        }
 
+       if(mod & GLUT_ACTIVE_CTRL) {
+               key &= 0x1f;
+       }
+
        write(pty, &key, 1);
 }