R
R
Roman Rakzin2015-03-19 12:44:16
WPF
Roman Rakzin, 2015-03-19 12:44:16

How to catch a key combination in c # (or in another language) and work with a file?

Good afternoon.
I want to do the following:
I select a word in the browser / Word ... (for example, in English / German) and press a certain key combination - for example ctrl + 1 - the selected fragment should be written to the value [word]
Then I select another word and press ctrl + 2 - the selected fragment should be written to the value [translation]
I want to do this quickly, so that I would select the word and press the combo key, then translate and eventually enter something like
cat -tab- cat
dog -tab- dog
.... into a text file.
Well, something like this. How to use windows api the application is better that it would be in the tray, but it tracks this key combination.
How to implement this or similar?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2015-03-19
@GavriKos

In any language, this is called a keyboard hook. You don't need WinAPI here either - the same .NET hides the form in the tray and quite supports the keyboard hook. Google to the rescue )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question