I am developing and UWP app. I need to customize the "KeyDown" event of "TextBox" control.
"KeyDown" event not triggered when typing with Vietnam language but it works fine with English / Korean typing.
Do I need to add anything additional settings or change any properties?
Can anyone please help me with this?
"KeyDown” event not triggered when typing with Vietnam language
It is by design, enable the Input Method Editor (IME) and Text Services Framework (TSF) when your apps have users who require assistive technology to enter text in complex languages, like Japanese and Simplified Chinese. Apps do not receive this event when an Input Method Editor (IME) is enabled. The Input Method Editor (IME) handles all keyboard input and sets Handled to true.
Related
I understand that the language of Message Box buttons is linked to the language of the Windows system. But this may not be the language of the end user. For instance, in a county like Switzerland having four official languages (German, French, Italian and Romansh), it is not unusual for a Windows system to be set up in English and not fit the user's needs. Adjusting the Windows Regional and Language options does not affect the language of Message Box buttons.
Is there any way to dynamically set an application to respect the System.Globalization.CultureInfo.CurrentCulture.LCID instead of the system language? I tried playing around with the parent form Localizable and Language settings with no success.
Any insight would be appreciated. Thanks!
I am developing a multi-language OSX app which also uses text-to-speech.
I am using mac's VoiceOver and Applescript to control it.
In the app, users can switch languages and VoiceOver has to read the text in the selected language.
The goal is to switch VoiceOver language without quitting my application.
I can't find a way in Cocoa or Applescript to find out what is the current language in VoiceOver and to actively specify what language to set.
This is what I have done so far.
In VoiceOver Utility there is a section called Activities that lets you setup some VoiceOver configurations, including the language.
So I created an English and a French activity.
Then I found this really helpful list of commands that you can use in Applescript to control VoiceOver: http://www.cbtbc.org/tools/asvo/voec.php
In this list the only commands that control VoiceOver activities are: "open activity chooser"
and "previous activity"
"previous activity" changes the language, but there's no way to know what activity you are currently on or to specify the name of the activity that you want to go to (English or French) when the user presses the language button.
So for example, if the user clicks on the English button twice, or switches the app language when the VoiceOver is off, the application might be showing English text while the VoiceOver might be set in French.
Anybody had experience with this?
Thank you so much for your help!
Is it possible programatically change keyboard input anywhere , when the program is in tray?
Example.
When user type text in, say, Google Chrome then my program catch the key the user types, and change it to another symbol (in another language)?
A -> ❤
B -> 웃
C -> ✄
etc.
Is it possible? and if answer is YES, then how?
This sounds like a job for a custom keyboard layout.
After installing your keyboard layout, the user need only enable it in the “Language & Text” preference pane and then select it in the Input menu extra.
It's also possible to enable and select an input source (keyboard layouts being a kind of input source) programmatically.
You can do this a number of ways.
You could capture NSEvent key events and change them.
You could override keyDown: in your own view subclass.
And more.
Read up on the Cocoa Text System first
https://developer.apple.com/library/mac/documentation/TextFonts/Conceptual/CocoaTextArchitecture/Introduction/Introduction.html
You can use Quartz event taps to receive all key events first and modify them before allowing them to be processed (or substitute different events entirely). Note that the user will have to enable access by assistive devices in Universal Access preferences in order for event taps to see keyboard events.
You could create, install, and have the user select a custom keyboard layout. You can use the third-party Ukelele program to create and modify keyboard layouts. This doesn't involve code, necessarily. It's just a big state machine for translating key codes to characters.
You can probably accomplish something like this by implementing an input method, too. See the Input Method Kit.
I'd like to create an Eclipse plugin that emulates the behaviour of the vi text editor. This would require changing the way mouse and keyboard events are handled. So, for example if the user presses "h" while in Normal Mode, the cursor should move left, rather than inserting the "h" character into the text buffer. I've found an old mailing list post that describes how to listen to changes in the document, and changes in the presentation, but nothing that describes how to intercept low-level keyboard and mouse events, such that the default behaviour can be overridden. What would be the best way to accomplish this?
One idea would be for a particular active text editor you would want to grab the low-level StyledText widget that is rendering the actual text and also accepting keyboard input and add a KeyListener there.
AbstractTextEditor textEditor = ...
ITextViewer viewer = textEditor.getSourceViewer();
StyledText textWidget = viewer.getTextWidget();
textWidget.addKeyListener(...);
How can I bind a key combination to my vb.net application? I know it has SOMETHING to do with the registry, but I have no earthly idea what or how to go about doing this. I want the user to be able to hit those keys when the app is open and have it execute my function, but not while the app is closed.
Thanks for the help!
If you are using a dialog, then you can put '&' into the text for some controls (buttons, checkboxes, radio buttons, etc) and this will cause Alt plus the next character in the text to be used as an accelerator/shortcut. i.e. "&Open" would activate the Open button if you press Alt+O. "Op&en" would activate if for Alt+e.
Beyond that, as Jason Irwin said, you need to add an event handler to your Form for KeyDown or KeyPress events, and then check if the keypress is the key combination you are interested in. This will only work if the user activates your form (clicks in it to give it the input focus. If they put it behind another window, it will not react to the key presses)
If you don't want to show a form, or want to react to keypresses when you're not the input-focus application, then it gets a bit more complicated (you either need to use a hidden form or a keyboard hook)
edit
OK, it looks like you want a keyboard hook. This looks like a good article.
It depends on what you are trying to do:
If you have a gui application and you want to handle key events then you can do that in a keydown eventhandler
If you want to do more low-level stuff and have an application that will intercept all key strokes (regardless of whether or not the application has focus/is visible) then you need to use pinvoke to hit the win32 apis. I suggest you read the following:
link text
Please let us know what you are trying to do so we can provide better feedback.
Using Google, I found this Keyhook example.
I've worked with keyhooks before, in Delphi WIN32, so I am a bit familiar with them. (Just not in C#.) If you add one to a DLL, all Hell might break loose since most virus scanners will recognise this as malware behaviour. (Especially if you use them in the wrong way, causing them to be injected in each and every process that's running on your system.)
A keyhook will allow key combinations to be captured from other processes, though.
For a solution without programming requirements: Drop a shortcut for the application on your desktop. Edit it, assign a shortcut, close it. Press shortcut to test...