Search code examples
c++windowseventskeyevent

Block alt+shift event or disable changing language in programming way


I need to block alt+shift keys event using C++, or some way to block changing language.

Thanks in advance.


Solution

  • I would go about it a bit differently. I would catch current langauge settings at startup than change it for desired one.

    At the even of alt+shift i would just set it back to the desired type again.

    It should be fairy easy to do with net framework.

    Here is a short article about manipulating languages: How to change input language programmatically

    And main class on msdna: InputLanguage documentation

    To actually prevent alt+shift from moving into windows system you would have to play with hooks.

    Here is an article about blocking keystrokes before windows process them.