This question already has answers here:
How can I intercept all key events, including ctrl+alt+del and ctrl+tab?
(13 answers)
Closed 8 years ago.
I want to display a message to the user when they try to lock the computer using CTRL + ALT + DEL, when they see the message then they will click OK and the computer will lock. How could I accomplish something like this? I have looked around but have found no solution.
You CAN'T. It is designed to prevent you doing that. No windows function supports CAD. It's about preventing password capturing.
And the reason we press those keys is that the IBM keyboard designer refused MS request for a special purpose key for logon.
From WSDK
Initializing Winlogon
When Winlogon initializes, it registers the CTRL+ALT+DEL secure attention sequence (SAS) with the system, and then creates three desktops within the WinSta0 window station.
Registering CTRL+ALT+DEL makes this initialization the first process, thus ensuring that no other application has hooked that key sequence.
Related
I haven't find anything relevant in Google or any Microsoft site about it so I decided to ask a question here.
Everybody knows that in Win-based OS there is a virtual keyboard. I also know that *nix based OS, have it too. So, the question is about:
HOW DOES IT WORK INSIDE?
I mean, let's have an example that I opened on screen keyboard in Windows 10. What's the actual difference between:
input via hardware keyboard: when I'm using it, like I press X button
..and using a virtual keyboard, when I press the same button
Imagine, I have an admin access to terminal/computer, is there any option to track/distinguish that in the second time I pressed button not on hardware keyboard, but on-screen (by mouse clicking) version of it?
And there are also many different software, like AutoIt (yes, it's a language, but it's relevant to this example) that emulating pressing the X button. How does they work in Win-based OS? Do they "in-common" with default on-screen keyboard and using the same driver/WinAPI or there is a difference between them?
And the second case, between:
default on-screen keyboard
compilated AutoIt script
..any other software that emulating press X button
I guess the only way to find out "how exactly button was pressed" is to check current processes list via taskmgr and find out have anything been launched or not. Or I'm totally wrong here, and missing something?
THE SCOPE
I have written a node.js script which emulates button pressing behaviour in windows app.
TL:DR business logic short => open notepad.exe and type `Hello world`
And could someone give me any advice/recommend any powershell/bat script (or any other solution) with demonstration of GetAsyncKeyState check behavior? With which I could easily check my own node.js script (not by functional of it, but by triggering press the X button event)
I found an answer for node.js case here: Detecting Key Presses Across Applications in Powershell
SendInput is the preferred method to generate user input in software. The Windows on-screen keyboard probably uses it for everything except Ctrl+Alt+Delete which I believe has some kind of special handling. The on-screen keyboard is only able to generate Ctrl+Alt+Delete in certain configurations.
Software-generated input is merged with normal hardware input in the RIT (Raw Input Thread) in the kernel.
A low-level keyboard hook can detect software-generated input.
This question already has answers here:
Handling AeroSnap message in WndProc
(2 answers)
Closed 9 years ago.
This question is a result of a discussion. I was wondering if a window that is created via WinAPI can behave like explorer windows e.g. can be controlled by the Windows and the arrow keys. (if you press Windows + ArrowKey the focused window should move and snap in that direction on the side).
Is it possible to tell that a window should behave like this or would one have to handle such control commands by himself?
All "standard" behavior is provided by DefWindowProc. As long as you pass all unhandled messages to DefWindowProc, you'll get it.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
OSX HID Filter for Secondary Keyboard?
I would like to write a Mac OSX Application that captures keyboard events on a second keyboard and consume them before other apps get notified? I don't my app to be notified of a keystroke on the main computer keyboard, just the second one. And I don't want other apps to get the keystroke, I want to consume it. Anyone here know the best way to go about this?
You will need IOKit to do this. The code would involve writing a kext and intercepting keyboard events and choosing whether to pass them on to the user space. Writing the entire approach here would be too complex and big but I can suggest a few references.
The code at KeyRemap4MacBook has quite a bit of low level code for device reading and interception.
Here is the custom kext that the author has written: https://github.com/tekezo/KeyRemap4MacBook/tree/master/src/core/kext
I suggest you look into the code to see how he has intercepted the keys, remapped them according to the user configuration and send them to the user space.
This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
How do i enable the service menu programmatically with out the user log out then enable it in the keyboard preferences?
Now i register my app as the service provider,but user must turn it on in the preferences - keyboard -services,now what i want to be able to do is enable it automatically,without logout etc..
Pilfered from another thread:
"
You need to include the NSRequiredContext key in each of your services' dictionaries.
The documentation doesn't mention this, but it is required since Mac OS X 10.6; as you've seen, your service will be disabled by default if you don't have it.
You should also call the NSUpdateDynamicServices function on launch, to refresh the user's Services menu without them having to log out and back in.
"
How do i enable the service menu programmatically with out the user log out then enable it in the keyboard preferences?
Is there a way to get a list of globally available shortcuts on a Windows system, including 3rd party software?
Random examples:
WndHop - WinKey + Enter to move a window between monitors
Dexpot - Ctrl + Spacebar to open task switcher
Launchy - Alt + Spacebar
My goal is to track down shortcut conflicts. Most of the above software can be customised to change the shortcuts aside from WndHop, the later which is not working for me, probably due to a conflict. Currently winkey+enter toggles a windows normal size and maximised, I'm not sure what introduced this shortcut.
I can't see that it would be possible to find all 3rd party short cuts. If an application has created a global keyboard hook to listen for a certain keyboard event there's no way that Windows can tell which keys will make it do various things.
Gathering a universal Shortcut list seems like rather a long winded way to achieve the result you want.
Instead I would suggest a process of elimination.
Start to eliminate apps running on your machine one by one by killing them off using either Task Manager or Process Explorer.
After killing off each of your programs, attempt the key combo in question again and if the action still occurs, then you have not yet found the program in question.
Eventually the effect in question will cease, and you'll know that the last app you killed off was causing this behaviour.