2

I am using two different keyboard layouts on my keyboard. I can switch between them easily by using Alt+Shift shortcut.

My question is whether it is possible in Windows 7 to hold some key to change keyboard layout temporarily?

Background: I am using English keyboard for programming, I would like to write comments with accents, and alt-shifting to write accented letters and alt-shifting back feels very clumsy.

This question asks the same question for ubuntu, but I have no idea how to do this in Windows.

Edit: As by the Dave Rooks comment, using AutoHotKey works quite well. After some encoding related head banging, I decided to go with this straightforward if not so pretty script (I ended up listing all the letters in the alternate layout that I wish to use):

!_X_::Send {Alt Down}{Shift Down}{Shift Up}{Alt Up}{_X_}{Alt Down}{Shift Down}{Shift Up}{Alt Up}

where _X_ corresponds to a letter on the key in the current layout.

  • 1
    You may want to check out AutoHotKey... It may suffice – Dave May 19 '14 at 12:37
  • Let me know if it works or not – Dave May 19 '14 at 12:51
0

AutoHotKey will work, but if you want an alternative, you can use Microsoft Layout Creator. Here is a copy paste from my other answer that will be relative to you:

Instructions for Keyboard Layout

With Microsoft Layout Creator, you can create new buttons using handy buttons such as Ctrl and Shift, such as Shift + H. (instead of Capital/Non-Capital)

  1. Download 'Microsoft Keyboard Layout Creator' from the official link. (here)
  2. Press Setup and start installing the program
  3. After it has finished, open it.
  4. Press File --> Load Existing Keyboard
  5. Choose the keyboard you want to modify, I used US.
  6. Now you see a keyboard, press the shift state you want. I used Ctrl.
  7. Now you'll most likely see an empty keyboard, or, a keyboard with some of its buttons filled. Press the button you want to assign after setting the shift state.
  8. I used Ctrl+T, once you hover over the letter, it will say things like "VK_T" T is the letter (you can use capslock)
  9. Once you click on the letter, a textbox pops up. Insert the symbol/letter you want. I used * and press OK. Repeat this with all the buttons you want to assign.
  10. Now, to save the keyboard, press Project --> Build DLL and setup package.
  11. A notification will pop up saying you must insert a name, press Yes.
  12. I used Layout01 and the name US - Custom, so after you done it, press OK.
  13. You might see a popup saying that you can see the log, press okay, and you'll get another one saying the installer was created at Documents. Press Yes to go to there and open setup.exe and install normally. Now you have to restart, and then when your back, you can press WinKey+Space to see the avaliable layouts/languages.

This site will help you if you have any problems.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.