I have a Moga Pro gamepad that I am trying to use with A-Frame. According to the A-Frame 0.5.0 docs on tracked-controls, I should be able to add something like:
<a-entity tracked-controls="controller: 0; idPrefix: Moga"></a-entity>
and I would be able to use my gamepad. But the above code doesn't work.
Also, I am running a gamepad test on a local server that identifies my controller as
gamepad: Moga Pro 2 HID (STANDARD GAMEPAD Vendor: 20d6 Product: 6271)
Do I need to do something else in the A-Frame code to make the gamepad work?
The tracked-controls component is for 6DOF tracked controllers, and won't support arbitrary gamepads. You probably want to try universal-controls or gamepad-controls instead.
Related
I trying the translate an equivalent of this Arduino digispark code into AutoHotKey code.
DigiKeyboard.sendKeyStroke(KEY_Q, MOD_CONTROL_LEFT | MOD_SHIFT_LEFT);
This code simply emulated a keyboard and types "CTRL+SHIFT+Q".
I also need a simple AHK code snippet that can detect CTRL+SHIFT+Q" being typed on the main keyboard.
Thanks in advance for pointing me in the right direction.
This will display a message box when ctrl+shift+Q is pressed.
^+q::
MsgBox , ctrl+shift+Q detected
Return
If you need it to also fire its native function, place a tilde ~ in front of the hotkey, like this ~^+q::.
Here's some good info from the help file, Hotkeys.
I am new to the plugin development of BimClientServerLib.
I have to create a plugin/service where i just need the 3D view and get all the information, so that if i push some information like simulate Door_1 it should be highlighted in the 3D View.I have used the [BimServerClientLib] to check in the project and retrieve some information like get all levels or get all detectors with existing BimViews as 3D viewer and the BIMServerClientLib as a separate Java service.Also, if i use the BimViews which is in Java script how do i push information with the service in Java.
Have a look at BIMSurfer. Download the project into any server (like tomcat), then navigate to the index.html. They have two examples, local one without a BIMServer and another with a connection to BIMServer.
You can adjust their BIMServer example to load your project and for highlighting a specific element, you can the provided library methods (available on the BIMSurfer github main page).
bimSurfer.setSelection({ids: ["object3", "object2", "object4", "object6"], selected: true });
Goodluck.
I am working on a website with React.js and asp.net mvc 4, I am planning to use Flux as my front-end architecture, but I met some problems and was very confused about the use of Flux:
In the beginning,I thought Flux would be a perfect front-end architecture in my website,but after I read a lot of articles about Flux, I find that they are nearly all with NodeJs,even the demos from facebook team,that means they all do the rendering stuffs of React.js/Flux code in server side,right? but How can I use Flux in the client side ,I mean in the user's browser?
I am very confused,am I wrong if I treat react.js/flux as a client side solution?If I am not wrong, but why they all use them with NodeJs and ES6(like facebook Dispatcher.js), That's ok in server side,but what about client side ? most of user broswers don't support ES6. I tried using Babel to convert Dispatcher.js from ES6 to ES5,but the es5 version had some errors and didn't work.
And I also found some implements of Flux that claim to support client side,like fluxxor,but I don't have a chance to try it before I write this post,because I am too confused.
I hope someone can help me to figure out these problems.
ps. Sorry for my english,if you don't understand my words,pls let me know , I will explain it.
I think you want :
$ bower install flux
Then you could do something like this (if using require.js):
require(
['bower_components/flux/dist/Flux'],
function(
Flux )
{
var dispatcher = new Flux.Dispatcher();
dispatcher.register(function(payload) {
if (payload.actionType='test') {
console.log('i got a ', payload);
}
});
dispatcher.dispatch({
actionType: 'test',
otherData: { foo: 'bar' }
});
});
(This answer uses : https://bower.io/, https://libraries.io/bower/flux, http://requirejs.org/)
React is a client side library. You can serve a React App with virtual any backend language. The reason a lot of examples are with node is because it is easy and fast to set up.
You should try this tutorial:
https://facebook.github.io/react/docs/getting-started.html
It is pretty straight forward and doesn't require node.
Also maybe you should try starting to serve the React app statically at the beginning to better understand React itself.
ES6 works in Browsers thanks to Babel. If you believe you have any trouble with Babel, you might want to first play around with it's REPL to get a feeling for it: https://babeljs.io/repl/
The idea is that the code can run on the client and server (universal js, used to be called isomorphic javascript (though it goes a little further then that with serverside rendering etc..),
There are many flux implementations reflux is the most promising at this point , im using martyjs (but they stopped the development, it will be taken over by alt) but even for the flux architecture, u just get the dispatcher / event emitter and some ideas :D,
Shorty said u can install the npm packages (flux, react , babel) etc, but u need something like http://browserify.org/(with reactify) or Webpack, to run them in the browser. U don't need to run them on a node js "after its bundled", webpack/browserify will bundle the code so it can used within the browser independently
https://github.com/christianalfoni/flux-react-boilerplate/ <-- ther are some boilerplate, that provide some nice guide on how to bundle the code.
I have a kiosk application built in Java Fx. How to set following VM Options in build.xml(ant script) of my application (.Dcom.sun.javafx.isEmbedded=true -Dcom.sun.javafx.virtualKeyboard=javafx) ? If anyone has done something similiar to this please let me know.
You can use the <fx:jvmarg> for specifying any JVM argument.
It is to be used inside its parent <fx:platform>.
An example on how to use it is
<fx:platform javafx="8.0+">
<fx:jvmarg value="-Dcom.sun.javafx.isEmbedded=true"/>
<fx:jvmarg value="-Dcom.sun.javafx.virtualKeyboard=javafx"/>
</fx:platform>
Similar examples can be found here.
I'm developing application with Qt Embedded and run it in linux framebuffer. I need a way to type non-US characters. Is it possible to change keyboard layout with Qt?
I tried to run it on Qt/X11. Layout switching and input are perfectly fine there.
But when I compile it with Qt/Embedded and run it in framebuffer I cannot change layout.
I searched in the documentation and didn't find anything about layout switching.
I think it has something to do with qt keyboard driver as specified at the documentation.
It seems that I should develop my own keyboard driver. But I'm using standard keyboard and I think there must be a standard way to change input language?
What would you suggest?
BTW, I'm using 4.5 version. Maybe 4.6 has something to solve this issue?
Exact the same problem here:
http://lists.trolltech.com/pipermail/qt-embedded-interest/2008-August/000034.html
http://lists.trolltech.com/qt-interest/2004-02/msg00570.html
Version 4.6 has gained keymap support. Solution:
generate kmap file:
ckbcomp -layout xx > xx.kmap
convert kmap to qmap
kmap2qmap xx.kmap xx.qmap
load keymap either by
specifying QWS_KEYBOARD environment variable:
QWS_KEYBOARD="TTY:keymap=xx.qmap"
or loading a keymap dynamically:
QWSKeyboardHandler * currentKeyboardHandler =
QKbdDriverFactory::create("TTY", "keymap=foo.qmap");
Make sure that you delete created handler when you create a new one:
delete currentKeyboardHandler;
currentKeyboardHandler =
QKbdDriverFactory::create("TTY", "keymap=bar.qmap");
Seems like Qt for Embedded linux is superseeded by Project Lighthouse. Not sure though, if it is production ready, neither I know how does it handle keyboard layout switching.
Update
Qt5 doesn't have QWS and all QWS-related APIs are removed. So you'll need some thirdparty solution. Or write a plugin for QPA.
I need a way to type non-US characters
You can change qmap, but even in Qt 4.8.0 there is no way to switch between US and russian (for example). You need to patch kmap2qmap (add AltGr_Lock support), qkbd_qws.cpp (change testmods according to state of AltGr_Lock). It's looks like no one is used QtEmbedded with keyboard. Or all keeps final patches in secret place.
Can't comment, so this is the answer to
You need to patch kmap2qmap (add AltGr_Lock support), qkbd_qws.cpp (change testmods according to state of AltGr_Lock).
This simple patch to qkbd_qws.cpp enables switch beteewn languages by the CapsLock button.
523,526c523,524
< //if (d->m_locks[0] /*CapsLock*/ && (m->flags & QWSKeyboard::IsLetter))
< // testmods ^= QWSKeyboard::ModShift;
< if (d->m_locks[0] /*CapsLock*/)
< testmods ^= QWSKeyboard::ModAltGr;
---
> if (d->m_locks[0] /*CapsLock*/ && (m->flags & QWSKeyboard::IsLetter))
> testmods ^= QWSKeyboard::ModShift;