Changing keyboard layout on application focus - automation

As everybody knows the en-US Keyboard-layout is the best one for programming. So I'd like to use it in my IDEs. But since I live in a non-en-US country I need the de-CH layout for all other applications. Now I wonder if it is possible to set the layout depending to which application currently has the focus. If that is possible, can a human brain adapt to such a behaviour or is it just confusing?
cheers,
AC
The operating system is Windows 7 and the IDEs are VisualStudio and Netbeans

i thought about the same question some time ago, haven't fount an easy solution and so i changed the layout of may PC (where i do mostly programming) to en-US and left my Laptop on de-DE (i'm from germany) - after almost a week i changed back my PC to de-DE because i was confused ll the time...

you should probably mention your operating system and ides. afaik there's an option to make the keyboard layout application specific โ€“ so you set it once after starting up your ide, and when you switch windows the layout is also changed.
nevertheless, have a look at ergonomic/optimized layouts (like neo ;)

There is an option in both Windows and Linux to use a US layout with additional international characters. For instance, typing an รค will be yielded by pressing RAlt+q. The good thing about this is that it's the same combination for Windows and Linux.

I think you can configure it easily with built-in Windows settings.
In "Control Panel" - "Clock, language and Region" - "Language", you can enable "Enable different input methods for each application window" (the translation is approximated because I am using Spanish OS). I think that suffices.

I created my own customized keyboard layout with Microsoft Keyboard Layout Creator (MSKLC)
I used my current keyboard as base and modified only a few keys in order not to always twist my right thumb when I want to get curling bracktes {}
It works very well in combination with a short-cut for switching the keyboard layout. You can define such shortcut in your system language settings.

Related

Delphi IDE has no color control for Standard Components

My Alexandria Delphi IDE has lost its color control for Standard Components.
I cannot set the Font color at design time for components like TLabel, but it's correctly applied at run time.
Non-standard components i.e. JvLabel seem to work at design time and run time.
Parent Font is False.
Have I screwed a setting somewhere?
From my point of view this is a new bug in the Designer of Delphi 11.
In Delphi 10.4.2 the color display of TLabel.Font.Color still worked correctly in the Designer.
I recommend creating an RSP in Embarcadero's Quality Central for this bug.
Update 19-Jan-23:
This is an already known problem of Delphi 11.X.
You can uncheck "Tools->Options->User Interface->Form Designer->mimic the system style" option as a workaround.

Smart keyboard internalization for IDEA

When I start IntelliJ IDEA, that message comes up, but I couldn't find any information about that feature and how it could help me.
Enable smart keyboard internalization for IDEA.: We have found out that you are using a non-english keyboard layout.
You can enable smart layout support for German language.You can change this option in the settings of IDEA more...
This dialog has been introduced on Github as fix for IDEA-63779.
It fixes certain keyboard shortcut clashes with non-english keyboard layouts. Cited from IntelliJ support:
This option enables support for certain hotkeys with "de", "fr", "it" and "uk" layouts. Without it some combinations will not work (like AltGr+7 to type "[" with German keyboard).
There are corresponding Linux and Windows issues as well.

Kate Editor shortcut to Focus/Defocus terminal doesn't work

I'm using Kate as the editor for some programs (Octave and sometimes MySQL).
I really like Kate's functionality, at the moment I've really exploited the link between the editor and the terminal.
I have changed some shortcuts to fit my needs as I replicate the behavior from other programs (it's not a big difference but I mention RStudio, which I also use).
The relevant shortcuts are: Show, Focus, Pipe and Synchronize Terminal. Since I modified Focus Terminal (Ctrl+Volume Off -F1 key-, strange choice but effective because of mentioned similarity with RStudio), it only works one way but it doesn't take me back to the editor. In addition, I noticed that the shortcut name changed to Defocus Terminal.
I'm using Kate version 5.0.0 on KDE Frameworks 5.9.0 and Ubuntu 15.04.
You should set a shortcut to View > Tool Views > Show Terminal, this then works as expected. You may have to save the current session to make it persistent (probably a bug). Invoking the shortcut will then toggle this action.

IntelliJ shortcut and keyboard layout

I recently acquired an HP Spectre 13 on which I installed GNU/Linux (Arch Linux). I then installed IntelliJ. Everything seemed fine until I tried the shortcut.
I'm on an AZERTY keyboard. I configured the system layout so that I can enjoy the right layout, i.e when I type the letter "a", I've got an "a", and so on. However, with IntelliJ, when typing text, the recognized keyboard layout is "azerty", but using shortcuts, IntelliJ recognizes a "qwerty" layout.
Example: To select all the text, we do ^A. But instead, I get a ^Q, though the letter "a" is recognized as an "a" when I code.
I'm clueless on this one, since for instance ^A works fine in my web browser. I doubt it may come from the hardware, but who knows.
PS: Whether it's IntelliJ 13 or 14, the problem is the same.
Alternatively, make the azerty keyboard layout first in order in system settings.
Source link.
And BTW, guess what, the problem still persists in 2020. ๐Ÿ˜
UPDATE: As of September 2020 there is a new checkbox to solve this:
(Settings -> Keymap -> Use National layouts for shortcuts)
For me, IntelliJ was using a different keyboard layout on Debian Jessie.
Force IntelliJ to use the French KB layout:
setxkbmap fr
https://wiki.debian.org/Keyboard
I finally found a solution by forcing the keyboard layout with the "setxkb" utility.
setxkb fr
It seems that doing it through my Desktop Environment (Cinammon) only solves it partially. It was also buggy.
So I decided to move to something more basic such as awesome and bspwm, where things doesn't come magically since you have to configure everything yourself.

Intellij ignores the selected keyboard layout

This seems like a bug in IntelliJ 12: Every couple of times when I switch between keyboard layouts (English and Hebrew) IntelliJ get stuck on one of them and ignore the windows selected keyboard layout. This happens only for intelliJ, all other programs respond as usual to the windows selected keyboard layout.
Is there at least a workaround, or a way to reset IntelliJ's keyboard layout? The only thing that seems to work for me so far is restarting my machine...
(My OS is Windows 7 Enterprise 64bit)
This is 100% reproduced when you switch keyboard layout in quick class search (Ctrl+N). Also in intellij idea 13.
Something like:
Open quick search menu when keyboard is not in English layout (Russian e.g.)
Type anything
Switch to English
Congratulations! you stuck in russian layout :) restart your intellij idea!
When I ceased to switch layout in search, I forgot about this problem.
UPD: it's suitable for most part of text inputs (even for search and file creation)
I've just had this problem on PyCharm 2020.2.3
Here's how I've solved it:
Go to Settings -> Keymap
At the bottom of the window, check the option Use national layouts for shortcuts (require restart)
That did the trick
restarting IntelliJ also works.
I wonder how they managed to get such a stupid bug, this is not an easy bug to write, especially in Java.
That was found to be more like a global Microsoft/Oracle bug. Simple workaround from IntelliJ's issue tracker: use Windows' language parameters to assign a hotkey (Ctrl + number) for changing the layout directly to a desired language. This suddenly will affect both Windows And IDEA. It's said that bug was fixed in Win8. A bit more info: here
In 2020 bug is still relevant in the most IDEs based on IntelliJ. For example I observe this in PyCharm now.
There is workaround for Windows:
Go to Language Bar - Settings... - Advanced Key Settings
Set key sequence of To English action to Ctrl + 1
Set key sequence of to other your language to Ctrl + 2
Apply
Go to IntelliJ/PyCharm and switch language by new sequences
After that bug disappears and you can switch language by traditional method
For me the following actions seem to resolve the issue:
Go to Control Panel
Select Clock, Language & Region
Press Region
In the opened window choose English for Format.
Also all my settings except the location are set to English (locale, default keyboard etc.)
This fix worked on my mac, access Preferences -> Editor -> Typing Corrector from the intellij IDEA menu. If you are able to navigate to the same window on your OS, you can try this.
Uncheck Enable keyboard layout correction in the Typing Corrector window
I got the same issue in Ubuntu 16.04. Restarting IDEA doesn't change anything. But Changing the default layout to be the one I want by default ensured ubuntu work well with it.
Go to the search textfield above file editor.
Switch layout.
Type smth.
Click somwhere in the file editor.
Write smth with swithed layout.