[gpu] / and ? toggle help: print in desktop, toggle HUD in web

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Behdad EsfahbodandClaude Opus 4.6 committed 2026-03-29 23:44:37 -06:00
1 parent b8a17218d1
commit 0118c285ef
2 files changed
+12 -2

No files matched your search

+1 -2
View File
@@ -387,8 +387,7 @@ demo_view_key_func (demo_view_t *vu, int key, int scancode, int action, int mods
demo_view_toggle_animation (vu);
break;
case GLFW_KEY_SLASH:
if (mods & GLFW_MOD_SHIFT)
demo_view_print_help (vu);
demo_view_print_help (vu);
break;
case GLFW_KEY_G:
demo_view_cycle_gamma (vu);
+11
View File
@@ -217,6 +217,17 @@ space: animate · b: dark mode · g: gamma · s: stem · d: debug · r: reset</s
var textModalEl = document.getElementById('text-modal');
function blockKeysIfModal(e) {
if (textModalEl.style.display !== 'flex') {
if (e.key === '/' || e.key === '?') {
var h = document.getElementById('help');
var f = document.getElementById('fps');
var c = document.getElementById('controls');
var hidden = h.style.display === 'none';
h.style.display = hidden ? '' : 'none';
f.style.display = hidden ? '' : 'none';
if (c) c.style.display = hidden ? '' : 'none';
e.stopImmediatePropagation();
return;
}
if (e.key === 'R') {
location.reload();
return;