Is there any way to press a key on the keyboard using Python Script?
If Yes, please suggest.
Is there any way to press a key on the keyboard using Python Script?
If Yes, please suggest.
looks like there may be a few ways by googling, never tried it myself though:
You can emulate a keyboard press using async def emulate_keyboard_press( key: KeyboardInput, modifier: carb.input.KeyboardInput = 0, human_delay_speed: int = 2 )
import asyncio
from omni.kit.ui_test import emulate_keyboard_press
from carb.input import KeyboardInput
async def press_enter():
await emulate_keyboard_press(KeyboardInput.ENTER)
run_loop = asyncio.get_event_loop()
run_loop.create_task(press_enter())
this is good to know! thanks, Jen!