Simulate Hardware button click - windows-phone-7

How can I simulate Hardware button (Back, Home, Search) click using Expensify test framework, on Real device connected to USB port on my system. Can you please guide changes required (if any) to acheive this..

Without using robotics, I don't believe this can be done on real hardware as it stands today.
I have talked to some of the US Microsoft DPE team about future support, but there has been no progress on this.
This can, however, easily be done on the emulator using steps such as:
Then I press a hardware button "PhoneHardwareButton"
where the PhoneHardwareButton enum is one of the values:
Back,
Home,
Search,
Camera,
VolumeUp,
VolumeDown,
Power,
Menu
from https://github.com/Expensify/WindowsPhoneTestFramework/blob/master/Server/Core/Tangibles/PhoneHardwareButton.cs

Related

Mouse/keyboard probably hacked

I recently played a game called "Quake Champions" from Steam. Against a player I know for a fact is a cheater, my left mouse button stopped to work whenever he was in a close-radius.
I am sure it is a cheat because my mouse works just fine on other computers.
I heard of DLL injection and cheaters using such methods. I am afraid somehow my mouse and maybe keyboard are being monitored remotely.
What can I do to find out, and also solve the issue ?
I tried re-installing display drivers, full game and deleted all files, mouse driver and app (mouse is Razer Basilisk Essential), I tried anti-malware softwares, etc.
Now even outside of the game the mouse seems to skip clicks at times, especially when I hold and drag (continuous fire in the game...).
I documented myself a bit and heard of hooks. I would ideally like to figure out which process (visible or not in task manager) hooks or interacts with both my keyboard and mouse, it would probably be a great way to figure out if I am in trouble or not.
Formatting the computer in full IS an option, but one I would prefer to avoid as I have costly licenses that I may lose, due to a limited number of activations...
Any help appreciated.
Further info:
Razer Central/Synapse -> Keyboard: Razer Cynosa Chroma ; Mouse: Razer Basilisk Essential
Further anxiety:
Shortly after this event happened, I received an alert from my Facebook saying somebody tried to log in... It was not me. It may be a coincidence, it may not. Fortunately my Facebook password is strong enough. But this is further reasons to be anxious on my end...

Projector’s remote controller events

I should make a PowerPoint presentation, but I don’t want do it. Instead, I know c++ and WinApi, and I decided to make an app, with cool effects, that would be presentation. In my classroom there is projector with the remote controller.
How can I handle events from the remote controller in my app? Will it be WM_KEYDOWN or something like this when I press next or previously on controller?
Also, can these events be handled in browser?
If you are familiar with serial communication, this work will not be difficult.
A number of projectors have RS232 or USB ports that can be used for controlling the projector's functions, i.e. switching inputs and powering on and off.
Then you only need to know the model of the projector, you can search the corresponding serial communication protocol on the Internet, or directly ask the manufacturer for the protocol information.
A small blog demo
And you only need to process the buttons of the remote control according to the serial port command.
Cases that might be useful to you:
Projector control - RS232 / USB?
3 EASY STEPS TO UNDERSTAND AND CONTROL YOUR RS232 DEVICES
Control projector via serial port
Obviously hard to say without knowing the model and brand of your projector. Many projectors do present these buttons as a USB keyboard, though (see one user manual specifying "page up" and "page down" keys as an example - I'm not affiliated with the brand in any way; it was just the first explicit specification I could find).
I suggest to try it out with the relevant equipment. The following website might be useful to see the keyboard input (and it incidentally answers your second question about the browser): key event viewer

Programmatically Press a Game Controller Button on Windows

TLDR
Have a USB Game Controller, searching for a method in any Windows compatible language to press a button on it.
Detail
I have Windows gaming PC and a set of four Ultimarc Ultrasticks built into an arcade cabinet. Each Ultimarc Joystick appears as 16 button device on Windows, because of a shift key feature I have no interest in using. It would eat a button and slow response time. My layout uses 8 buttons, which is exactly how many inputs the joystick has.
However, I'm hopeful I can use the fact that those buttons exist for the device to add a virtual start button to each joystick.
I'm open to using any language, but looking for a method to programmatically press the 9th button on this joystick, which is available as far as windows knows, despite not having a physical input.
I'm familiar with key remappers that create a virtual game pad with their keys mapped to other physical devices, but those come with the complexity of having duplicate joysticks on the system, and don't seem necessary if I can just virtually press this one more button, since all other buttons and axes are mapped as I want.

Low level keyboard hook

I just bought a new keyboard, and I'm interested in tracking exactly how many keypresses/strokes I make during the entire life of the keyboard. (I would want to just record keyUp, as I don't care about repeats)
I've been googling around for the best way to do this, but I don't even know what approach to take, so I'm having trouble searching intelligently.
Also, the only language I've really worked with is C#. Haven't done anything with C/C++ or WinAPI
Is it difficult to modify the Win 7 drivers directly?
I do want to be able to record keystrokes from the moment the computer boots, but this may not be easily done.
I would prefer to use an existing driver or hook, as I really don't care to get into learning device drivers right now.
I've looked briefly at Ctrl2Cap, but I don't know how to modify something like that to suit my case.
Other questions I looked at,
Writing a keyboard device driver
Low level keyboard Hook not at UI thread
This one indicates writing a USB Filter driver may work, but I have no clue where to start on that.
Disabling the keyboard in windows c++?
It is not necessary to go the driver route, which is not for the faint of heart. You can use use a low level keyboard hook which will work fine from .NET.
I did a quick bing and found the following on codeplex
http://globalmousekeyhook.codeplex.com/
It should get you going
If you want to do that you need to use Kernel Level Keylogger. It's grabs the keystrokes before the operating system takes effects and this one 99% invisible for detection techniques. Then you can grab the Windows Log On screen typed things like password/username etc.
#ChrisTaylor's key logger not work for WinLog-on Screen I reckon. If you can install the keyboard driver filter before the system keyboard device driver take a action you can handle windows user login screen also. But In order to install this driver level key hook you need to have administrator privileges.
I found Unix and Windows Keyloggers from Github. Free to play with this https://www.adlice.com/kernelmode-rootkits-part-3-kernel-filters/ and have fun!
That, what you want is dangerous!
With the same code everyone can create keylogger*
But if you not a virus creator then I recommend you to search "hotkeying in C/C++" or something like that and hook keyboard with hotkeys!
I have written HotKey Maker in VB6 which can make hotkey from every button of keyboard.
But I really not interested in viruses :)
Good Luck !
*Virus which hooks your keyboard and send all what you wrote in keyboard to Virus owner

2 Mice, capturing exclusively one mouse on windows (DirectInput, DDK, Linux, anything)

I have connected 2 mice to PC and I wish one mouse to work as regular mouse and capture second mouse exclusively.
First I was trying DirectInput. It showed 2 devices with word mouse in InstanceName.
But only one device had DeviceType.Mouse and it was only really working device.
When I was acquiring it was blocking both mice.
Second I decided to create driver. I downloaded WinDDK. There is Mouse Filter driver sample.
I was able to compile it.
But I am not driver programmer. It is complex for me to understand but it has some code related to PS/2 mouse. All my mice are USB.
It should be installed with .INF file. I prefer it be dynamically loaded.
I am not quite sure that it is right direction.
I do it for my hobbyist robotic project. I wish PC take some information from mouse as sensor.
I think there must be existing similar projects or solutions.
I have linux pc on my table as well. May be better to attach mouse to linux and parse
/dev/input/mouse0
/dev/input/mouse1
/dev/input/mouse2
looks like
sudo cat /dev/input/mouse1 - gives some data but does not block device from clicks and movements.
I hope simple solution already exists
Cheers
Max
For Linux, you need to either declare the first mouse as the CorePointer or configure the second mouse to have SendCoreEvents false. See the xorg.conf(5) man page for more details.

Resources