66import time
77
88import numpy as np
9+ import OpenGL .error
910import pyglet
1011import pytest
1112import torch
12- import OpenGL .error
1313
1414import genesis as gs
1515import genesis .utils .geom as gu
@@ -1236,13 +1236,14 @@ def on_key_press(self, symbol: int, modifiers: int):
12361236@pytest .mark .parametrize ("renderer_type" , [RENDERER_TYPE .RASTERIZER ])
12371237@pytest .mark .skipif (not IS_INTERACTIVE_VIEWER_AVAILABLE , reason = "Interactive viewer not supported on this platform." )
12381238@pytest .mark .xfail (sys .platform == "win32" , raises = OpenGL .error .Error , reason = "Invalid OpenGL context." )
1239- def test_interactive_viewer_disable_keyboard_shortcuts ():
1239+ def test_interactive_viewer_disable_viewer_defaults ():
12401240 """Test that keyboard shortcuts can be disabled in the interactive viewer."""
12411241
12421242 # Test with keyboard shortcuts DISABLED
12431243 scene = gs .Scene (
12441244 viewer_options = gs .options .ViewerOptions (
1245- disable_keyboard_shortcuts = True ,
1245+ disable_help_text = True ,
1246+ disable_default_keybinds = True ,
12461247 ),
12471248 show_viewer = True ,
12481249 )
@@ -1251,7 +1252,9 @@ def test_interactive_viewer_disable_keyboard_shortcuts():
12511252 assert pyrender_viewer .is_active
12521253
12531254 # Verify the flag is set correctly
1254- assert pyrender_viewer ._disable_keyboard_shortcuts is True
1255+ assert pyrender_viewer ._disable_help_text is True
1256+ # Verify that no keybindings are registered
1257+ assert len (pyrender_viewer ._keybindings ) == 0
12551258
12561259
12571260@pytest .mark .required
0 commit comments