I’m trying to implement the keyword “buttonHotKeyList” in the “YesNoDialog” constructor as I saw it in the Panda3D Reference. However, it does’t seem to have any affect (I still cannot use keys as replacement for the mouse). The code is taken from the example that can be found in the Panda3D manual, only adding the mentioned keyword:
Thanks for your answer. How does the focus property work on buttons? I have only seen it in the “DirectEntry” class, and I couldn’t find any reference to it in “DirectButton” or “DirectDialog”…
Thanks for your help. Unfortunately, as I tried this solution I found out that it is only possible to have one button “focused” at once (that means, I can only , for example, choose “Yes” and not “Yes” or “No”). Here is the code I used:
for i in range(0,len(dialog.buttonList)):
dialog.buttonList[i].node().setFocus(True)
for i in range(0,len(dialog.buttonList)):
print('Focus button '+ str(i+1) +': ' + str(dialog.buttonList[i].node().getFocus()))
With the screen output:
Focus button 1: False
Focus button 2: True
I guess I’ll do the workaround you suggested before (catching key-events).