Can I store a program on my mouse that runs when i connect it? - mouse

So various people around my house have been stealing my mouse and I was wondering if I could store a program on the mouse which runs whenever it's plugged in, asking you for a password. I know you can run a program stored on a computer when a device is inserted into a USB slot but that means I can't stop people using my mouse if the specific laptop he's using hasn't got the program installed.
Also, if this was possible, what language would use? I would like it to work on windows, linux and OSX to cover all bases.
Thanks for any help!

Related

programatically disconnect or change monitor settings on mac

so - I have a bunch of different machines that I switch between using a usb switcher, and have a bunch of things like mouse, keyboard, camera, other monitors etc hanging off the USB - but the computers are all directly plugged into the big main monitor in various different ways.
I've written stuff in swift and c# for the various machines that detects the usb disconnection and turns off the main screen, and that works great, so it automatically flips to whatever new machine I've moved to - but with my mac laptop I've decided I want to keep the laptop screen as like a second machine and keyboard. The problem is - there's a hdmi connection to the big monitor - and I need the mac to stop sending hdmi, because the screen is now owned by someone else - so I suddenly want the mac limited to the laptop.
On windows it would be easy - you just disable the device, then re-enable it when the docking usb comes back - but I don't know how to do the same thing on the mac. Even from the display settings ui, I can't seem to say "don't use this monitor" - I can say "mirror the laptop display" - which may be good enough, but even that I don't know how to do from code.
so the actual question:
how do I programatically "remove" and then later "attach" a hdmi monitor
and set it as the main display
if that's not possible, how do I
programatically switch a monitor between mirroring and not mirroring
Ideally in swift, but python is also viable.
At the moment I literally have to pull out the HDMI from the laptop and then plug it in each time... which is not ideal.

How to intercept and forward keyboard strokes to computer

I'm trying to figure out the best way to intercept some keyboard commands without installing any software on a machine.
Im basically wanting to send a trigger (on / off) via bluetoothLE to a device when the space bay is pressed on the keyboard. Without installing software.
I'm thinking that i can intercept all key strokes by plugging the keyboard into the pi, and then forward them on to the computer via another cable? While then sending blue bluetoothLE via the pi.
Can anyone help me out with this, is it possible how I'm imagining it?

Is there any method to log into blackberry 10 through usb cable

Now I face a tricky problem. My Blackberry Classics has a black screen problem. When I connect it to my laptop with USB cable, Blackberry Link can detect it. However when it tried to connect to it, the Blackberry Blend prompted me to set the Allow Connections switch to on on the device. Obviously, I could not do that. I am thinking maybe there is a method to let me connect to the Blackberry 10 through the USB port just like a console port, but I am not sure. Does anyone know about it? Thanks in advance.
Momenitcs does provide a few ways to connect with a device. But generally the device has to be in development mode, which requires interacting with the device which you apparently can't do. The access is also limited to the development user so you could not use it to, for example, access data from installed applications.
About the only thing you can do at this point is use link to backup your data and restore to that phone once repaired, or to a new phone.
Also, since this question is not really suitable for StackOverflow I'm going to flag it for closing. Questions like this properly belong on SuperUser http://meta.superuser.com/questions/4836/what-is-the-difference-between-super-user-and-stack-overflow/4838

How can I speed up the first-time loading of a Windows device driver for an USB device?

We have some boxes running Windows XP for an automated production process. I (not me personally but a robot) connect new USB devices to these boxes. There is a device driver for this device type and it's loaded after connecting a device and running like a charm.
But ... it takes about 8 to 10 seconds after pluging in a new device until it is accessible. When I connect an already previously seen device again it only takes 3 seconds. The driver has a catalog file. It's not signed by Microsoft WHQL but uses a test certificate we have installed on the machines.
There is only one inf/pnf file to be considered and so I wonder why it takes so long to detect a new device, create the information in the registry and load the driver.
Time is money and so I need to speed up the process.
Any hints for me? Especially does somebody know that WHQL-certified drivers are recognized more quickly by Windows / device manager?
These devices have unique serial numbers, correct? That's part of what Windows uses to create the per-instance data necessary to track whether it's seen this device before. In the case where you plug in a device that's already seen before, Windows will pick up the old instance data and load the appropriate driver. If you plug in a device that Windows has never seen before (e.g. same VID/PID but different serial number), it needs to go through the process of creating registry entries, parsing the INFs to find the correct driver, etc.
Are you sure those devices that show up quickly with WHQL'd drivers have never been attached to the system before? Also, are these systems configured to connect to Windows Update to look for drivers when a new device is attached? It's definitely true that Windows will prefer a WHQL'd driver over an unsigned (or self signed) package, so it's possible that Windows is trying hard to find something else before defaulting to your self signed driver.
-scott

Using iPhone as control device (game controller type) in Windows

Is there a way to use the iPhone as an interface device for a computer without actually having to code a driver? Being the owner of a sub-par game controller and realizing that it would be cheap and a good experience to try to roll my own, I have no idea where to begin on the PC side. I am capable of processing accelerometer and touch events on the iPhone and sending them over a network, but where would I begin on the Windows side? I'd prefer to not get as low level as a driver, but I want to be able to use the accelerometer as an analog input device and buttons on the screen as regular buttons. How should I go about this? If I have to write a driver, what would be a good reference/code sample to start with?
You don't need to write drivers as long as you handle the data being sent by the iPhone on PC. As far as where to begin on PC side, all you need to do is create a small program which listens for data on the socket. You can make that program in any language C, C++, Java etc. I had worked on a similar application as mentioned by you. On PC I used Java with Visual Studio IDE.
I believe this is similar to what Splashtop's Remote does (http://www.splashtop.com/remote/touchpad). They seem to use a network connection to accomplish this goal.
Also Joypad, same concept (http://getjoypad.com/).