I want to use autohotkey to control a program, which relys on the input of a 3D-Mouse (3DConnexion SpaceNavigator). How can I simulate a axis in autohotkey?
Maybe 3DConnexion SpaceNavigator uses same axeses as joystick? So check joystic controls here: http://ahkscript.org/docs/KeyList.htm#Joystick
If it does not helps, you can try to get the name of the control with that guide: http://ahkscript.org/docs/KeyList.htm#SpecialKeys (some explanations here: Macro Keys not Detected AutoHotkey)
By the way please write your impressions about 3D-Mouse (3DConnexion SpaceNavigator) in comments.
I think you need to get the SDK and write your own intigration...seems to be the only option, unless you figure out a way to communicate with the device by watching the usb signal
Related
I'm working in a project where i have to control a Robot (I have it already as a Simulink Model) with an XBOX Controller.
Until now I couldn't find a good Example or a good Idea to let these two interact.
I want to change some variables (INPUTs) with the buttons of the XBOX Controller and then get a feedback (Example: a vibration feedback) (OUTPUT).
Is it possible to do that with ROS and Simulink ? So that i can work with ros_joy, and then implement it in my Simulink model ?
It'll be very helpful when i get some advises here.
Thanks a lot.
I can't test this, but I know from ubuntu <= 16 that jstest and jstest-gtk (the nicer gui interface) can be installed via apt, to check & configure any joysticks/gamepads, and it works well. Then you will have your gamepad as a device under /dev/. (Ex: /dev/js0, /dev/input/js0). And that file handle is easy to use, with many supporting 3rd party/one-off libraries (you don't have to use all of ros if you don't want/need to).
And I know from matlab that there are ways to hack up a solution, but their own 1st party solution is vrjoystick, which takes in a 1-based numeric id. This should mean your gamepad shows up as js0, and the id should then be 1: id = 1; joy = vrjoystick(id,'forcefeedback');.
I would like to control blinds using google smart home action. How can I create commands like "turn/put my blind up/down" ? What device traits should I use? It seems OnOff trait doesn't understand up and down, can I custom it? Thanks!
You could use the undocumented (use at your own risk) device type: action.devices.types.BLINDS.
Instead you could use for traits:
On/Off: action.devices.traits.OnOff
Brightness: action.devices.traits.Brightness
In this way, you can ask Google to set a specific position, to close (in Italian it works as a turn off command, in English, I did not try yet), to turn on or to turn off. The open command instead seems to be not recognized as a turn on command.
Hope to help you and hope that Google releases soon types and traits for blinds/curtain control.
EDIT as pointed out by #robin-thoni is not documented: https://developers.google.com/actions/smarthome/guides/blinds
For some reason, I need the Shuttle Xpress keypad to map to keys like "Caps lock + v", "Ins + a". But the shuttle doesn't recognise the "Caps lock" as a modifier key. It can only map "Caps" or "Ins" alone. I try to use AutoHotKey software, but it failed to catch the shuttle's input signal.
The shuttle has its own driver. How can I catch the Shuttle Xpress signal, and map it to any key combinations I want?
You MIGHT be lucky and the device may be a "HID" device.
Most input devices (All keyboards, mice, "normal" joysticks, XBox controllers, PS4 controllers, etc, etc) are HID devices.
From a cursory google, it seems that it is a HID device or there is maybe some mode you can put the device in to make it a standard HID device?
In which case, AHK natively cannot read it, but it can be done through WinAPI calls (DllCall()) to the RawInput API.
There is a library called AHKHID that will let you read HID devices from AHK, and I am working on similar solutions (Though mine these days are tending to be written as a C# DLL which you then call from AHK), but I don't think I have anything that could help you at the moment - I have only implemented mouse movement in RawInput so far.
If / when I do though, I would post it on the AHK forums (I post as evilC), so keep an eye out there.
I made a workaround that enables me to map ShuttleXpress buttons to any keystroke sequence or scripts. The input is routed to ahk via the Fn keys. This works very well for my use, could be worth a try.
1: Remap Shuttle Xpress buttons to function keys between 13-24. (1-12 is of course also possible, but then you would tie up the physical Fn keys on the keyboard.)
2: Use ahk to remap the same function keys to any script or keystroke.
I am really new to linux module programming.
I need to some how be able to do some tweak to the ath9k driver in linux.
I finally got the compat wireless source code of ath9k to compile in ubuntu 11.04 and was trying to play around with the code.
I tried using printk to tried to get to see what happen.
First I put printk in the init.c file, the message I printed show up when I use dmesg in the terminal. However, when I tried to use the same printk in another file like rc.c it does not show up at all.
I am wondering why is that?
And is there some other way that I could some how log some information from the code similar to the fprintf. What I need is I need to extract somehow the packet header from the driver.
Thank you
Best Regards.
read about the proc fs, it's a great framework to extract data from device drivers.
once you have registered a device node as proc fs, you can read from it.
once the the read function is called, a callback function you defined is creating the output. this is an excellent way to retrieve data from device.
there are also two other methods, one is sysfs, you can google for it. and the second,
if the the device is a char device, you can implement an ioctrl function which returns the info you need.
I'm wondering, is it possible to somehow map a key-press event to act like a middle-key click of a mouse in Xwindows? They are diffrent devices, I know, but if there was a way to trigger a middle-button click event from a C program, it should be easy to bind a key to it using existing xwindows mechanisms.
Xevent does the trick:
http://www.isv.uu.se/~ziemann/xevent/
http://linuxgazette.net/153/misc/ziemann/xevent.c
The code compiles and runs just fine on my machine.
If you are interested as a developer: It uses the XTest extension, which is included in the X server. There is also some old, still valid documentation of that API online:
http://www.xfree86.org/current/xtestlib.html