mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 00:11:14 +01:00
[gpu] Add Backspace as alternative reset key
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
98f7d746f3
commit
47512ddcb4
3 files changed
+4
-1
No files matched your search
@@ -397,6 +397,7 @@ demo_view_key_func (demo_view_t *vu, int key, int scancode, int action, int mods
|
||||
#endif
|
||||
|
||||
case GLFW_KEY_R:
|
||||
case GLFW_KEY_BACKSPACE:
|
||||
demo_view_reset (vu);
|
||||
break;
|
||||
|
||||
@@ -576,7 +577,7 @@ demo_view_print_help (demo_view_t *vu)
|
||||
LOGI (" {, } Stretch/shrink vertically\n");
|
||||
LOGI (" h, j, k, l Pan (vim-style)\n");
|
||||
LOGI (" Arrow keys Pan\n");
|
||||
LOGI (" r Reset view\n");
|
||||
LOGI (" r, Backspace Reset view\n");
|
||||
LOGI (" <N><key> Repeat key N times (e.g. 30=)\n");
|
||||
LOGI ("Mouse:\n");
|
||||
LOGI (" Left drag Pan\n");
|
||||
|
||||
@@ -82,6 +82,7 @@ typedef void GLFWwindow;
|
||||
#define GLFW_KEY_R 82
|
||||
#define GLFW_KEY_V 86
|
||||
#define GLFW_KEY_ESCAPE 256
|
||||
#define GLFW_KEY_BACKSPACE 259
|
||||
#define GLFW_KEY_RIGHT 262
|
||||
#define GLFW_KEY_LEFT 263
|
||||
#define GLFW_KEY_DOWN 264
|
||||
|
||||
@@ -443,6 +443,7 @@ dom_key_to_glfw (const char *key)
|
||||
{
|
||||
if (!strcmp (key, " ")) return 32; /* GLFW_KEY_SPACE */
|
||||
if (!strcmp (key, "Escape")) return 256; /* GLFW_KEY_ESCAPE */
|
||||
if (!strcmp (key, "Backspace")) return 259; /* GLFW_KEY_BACKSPACE */
|
||||
if (!strcmp (key, "ArrowUp")) return 265; /* GLFW_KEY_UP */
|
||||
if (!strcmp (key, "ArrowDown")) return 264; /* GLFW_KEY_DOWN */
|
||||
if (!strcmp (key, "ArrowLeft")) return 263; /* GLFW_KEY_LEFT */
|
||||
|
||||
Reference in new issue
Block a user