-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RegisterKeyEvent always return undefined in script #770
Comments
Log seems to tell us that:
So, it would appear there is no constructor taking Qt::Key enum. Sorry about the erroneous example in the documentation. Using the QString constructor instead should help: var moveFwd = ic.RegisterKeyEvent(new QKeySequence("W"));
// ... I will update and fix the documentation in the near future. |
Oh, and just making sure that you're trying this with a Meshmoon Tundra/Rocket, and not a realXtend Tundra? This feature has not been merged to realXtend Tundra. |
Thanks for updating the documentation, i just copy paste the code from documentation and forgot to mention that in my code i have declared a valid sequence (Qt.ControlModifier + Qt.Key_F). Many thanks for you feedback |
Ali what has not been merged? Seems to all be there, no? |
Oh seems that the register func is not returning a ptr
|
Unfortunately QtScript doesn't understand refs, only ptrs, so this has never worked in rex Tundra. I have changed it to return ptr instead in Meshmoon Tundra in order to make it work. |
@Arthegal Do the following changes Change
Change
Those should get you going :) |
More changes are needed: ee8f676 |
Hmm does does the commit show up in realxtend/Tundra if its not merged yet? I suspect he could cherry pick the commit fine if you would find the meshmoon commit id for him. Oh well... |
Have to admit i'm really impressed by your reactivity and support. Thank you so much for your help and more generally for this wonderful project. ;-) |
You're welcome! |
just one thing I like about these guys.... ;) |
Hi guru, long time no see! :) I'm making 64bit linux .deb packages for Meshmoon Rocket, Ubuntu 14.04 in particular. Maybe you would be interested in doing some testing when they are done? If I remember right you were working quite a lot in linux? |
I'm trying the following code from documentation of InputMapper to migrate to InputContext
var moveFwd = ic.RegisterKeyEvent(new QKeySequence(Qt.Key_W));
moveFwd.SequencePressed.connect(function() { me.Exec(EntityAction.Server, "Move", "forward"); });
But moveFwd is always undefined!
Thanks in advance
The text was updated successfully, but these errors were encountered: