First of all, I am NOT asking about how to change the IME of my own application.
I would like to create a IME toggle program for my own use, like that of Mac OS. Windows 8 got better but Windows 7 sucks at here. Alt+Shift to cycling through more than 2 IMEs are painful. (I use three.) I can assign a shortcut for each language but the keyboard combination sucks and more importantly, there is a bug that the shortcut keeps disappearing.
To create such a program, I need to
1)know the current IME mode (global)
2)set a specific IME mode (globally)
I looked up Windows' IME API, but I could not find any. Is there any way? If there is none, please tell me so. I will also accept that as an answer. If there is any way, just hint me the names of the API, I will search for the details.
Thank you.
I found out the answer myself.
"GetKeyboardLayout"
PostMessage WM_INPUTLANGCHANGEREQUEST
The ImmSimulateHotKey function can toggle IME on windows 7 ,but I find the ImmIsIME function is invalidation on win 7。
Related
For those who remember (or still use) Windows XP, you might remember that you could launch the start bar with your Windows key on your keyboard and then hit the letter of the program/folder/file you wanted and as long as there wasn't another program/folder/file on the start bar starting with the same letter, it'd launch right away.
e.g. If you wanted to open excel, you'd hit the windows key and press the letter "e" and excel would launch.
So, for those who do remember that feature, I'm wondering, is there any way to get that functionality back in Windows 8.1? Right now, what happens is that when you hit the windows key, Metro pops up (which is fine) but if you type "e", for example, windows will automatically start searching instead of just launching Excel (or whatever letter you've typed).
I'd rather keep the interface as it is and, if possible, prefer not to install any 3rd party software (unless there's no other go). My preference is to be able to utilize the OS to get that option (if available), even if that includes going through regedit.
Just a note, I am already aware that 8.1 and XP are completely different architectures and I also realize that automatic searching does have its benefits but I prefer that specific XP functionality so it'd be great if I could get it back in 8.1.
Thanks in advance for your help.
This isn't the exact thing that I'm looking for but I've found somewhat of a workaround. You can create global keyboard shortcuts and thereby circumvent the metro/start screen altogether.
To do so, create a shortcut of the program/folder/file you want to easily access (the shortcut can be placed anywhere). Then, go to the properties of the shortcut and go to the shortcut tab where you can enter a global shortcut key (about half way down the box).
Of course, there are limitations to this because there are only a few keys (key combinations) free that you can use globally whereas with the XP method I was looking for, you could essentially have up to 36 different items you can access with just two keystrokes (26 letters, 10 numbers - not sure if other characters worked).
If anyone has figured out the XP method, though, that would be great.
The code below will send the keystrokes to the DHTML edit control on Windows Vista but not on windows xp.
DHTMLEdit1.SetFocus
MySendKeys ("zzz")
MySendKeys refers to a replacement for VB6 Sendkeys written by Karl Peterson for windows vista and beyond. But I don't think that's relevant because the following code does not work on xp either
DHTMLEdit1.SetFocus
SendKeys ("zzz")
On windows xp the DHTML edit control is "DHTML Edit Control for IE5" according to the project components window in vb6
On windows vista it's the "DHTML Editing Control" which does not come pre-installed with windows but is available from Microsoft.
Does anyone know how to make it work?
SendKeys() isn't so compatible anymore. DHTML editor likely has another method of inputting data that doesn't require you to hack something together like that. For the most part, it's usually a security risk.
Also, it's likely a different control altogether, and it might not even properly respond to key strokes.
Perhaps you can elaborate on what you're attempting - maybe there's a better solution than sending key strokes.
I ended up using this inelegant solution
Clipboard.SetText "zzz"
DHTMLEdit1.ExecCommand DECMD_PASTE, OLECMDEXECOPT_DODEFAULT
DHTMLEdit1.SetFocus
On vista and later it's effect is the same as sendkeys.
On xp it inserts the text correctly but doesn't leave you
with a blinking cursor (you have to manually click the control
to resume typing from the keyboard).
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
i have made my custom keypad so i want to enter the text with my custom keypad. But the problem is that every time when textbox get focus the default keypad pops up.
so how can i fix this or i have to have to opt some patch.
I don't believe this is possible, as the SIP is controlled by the OS, and is shown depending on whether you have a hardware keyboard or not. If you really want to have a custom keypad, you will probably need to design your own data entry controls as well (ie. custom textbox that shows your SIP).
You can't do it the "elegant" way. If you really need this you could build the following:
1. User touches the control (control has focus ... open your custom SIP)
2. immediately switch the focus to a hidden, non textbox control
3. OS SIP will not show if this is done fast enough
Sorry, this is the only way I am aware of :(
A related example: http://www.dreamincode.net/code/snippet5650.htm
This is not possible, in this release anyways. I have also run into a problem with using the default keypad. But there are some options to use a keyboard that is designed for different types of input (ex. Search, Text, etc.).
Check out this article. It gives quite a few options in wp7 when it comes to the keypad. I'm sure one of these could be usefull.
All you have to do is set the InputScope = "" in the textbox control to whatever scopes are available(check article ^).
HTH.
try setting the IsReadOnly property of the testBox to true
Its an Interesting task .
I remember , i did the similar task with Windows Mobile 6 / 5 and Pocket PC 2003 where we have the access to the native API's via pInvoke and disabled the SIP Button . like using SHFullScreen
I think this is not supported in Windows Phone 7 since it is purely managed code .
How can I change the "OK" text into "Great!" on all buttons in Windows 7's dialog windows?
The MessageBox function is documented as being in User32.dll. Modify that and you should be set.
A couple of caveats:
This is an important system DLL and Microsoft will have gone to some lengths to keep it from being modified. Not only will you have trouble modifying it, but if you succeed Windows might restore it from a backup as soon as it can.
If you screw up you might make your system unbootable.
If I ever find you doing this to any PC of mine, prepare to hide and hide well, because I will be looking for you.