Community
VRED Forum
Welcome to Autodesk’s VRED Forums. Share your knowledge, ask questions, and explore popular VRED topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fehler in der API Documentation vrKey Modifier

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
494 Views, 2 Replies

Fehler in der API Documentation vrKey Modifier

Die VRED Python API Documentation gibt für den modifier im Konstruktor des vrKey(key,modifier) falsche Schlüsselwörter an.

 

Laut API sind es die folgenden:

(Key_Alt, Key_Control, Key_Meta and/or Key_Shift)

 

Diese funktionieren nicht, dafür aber diese:

- AltButton

- ControlButton

- ShiftButton

Was auch immer der Key_Meta Button ist, lehne ich mich mal aus dem Fenster und behaupte er heisst so:

- MetaButton (ungetestet)

 

Auch die Kombination der modifier wird nicht, wie durch die API Documentation beschrieben, durch den logischen Operator "or" kombiniert, sondern durch ein "+"

 

Beispiel:

keyK = vrKey(Key_K,ShiftButton+ControlButton)
keyK.connect("print 'Yolo'")

2 REPLIES 2
Message 2 of 3
marcus_fritzen
in reply to: Anonymous

Hi Eduardt,

 

thanks for the hint. You are right, when talking about modifier keys you need to use ShiftButton, AltButton, ControlButton and so on. However, the 'logical or' works fine e.g. ShiftButton | ControlButton.

Key_Meta is the Windows Key respectively Cmd Key on macOS. Currently there is no modifier implemented for this key.

We will update the documentation for the next release.

 

Thanks,

Marcus



Marcus Fritzen
Principal Engineer
Message 3 of 3

I have to correct myself because I simply codied the text and haven't thought about it. It is not a "logical or" it is a "bit-wise or". So, it is not either or, instead it is an accumulation of the modifiers. We will also correct that. Thanks for the tip, Sinje.

 

Cheers,

Marcus



Marcus Fritzen
Principal Engineer

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report