Setting default keyboard layout application-specific?
If you go to Control Panel / Regional and Language Options / Languages / Details / Key Settings", you can define hotkeys for language changes.You may couple this with a macro language like AutoHotkey to define a macro that starts your application with the correct language / keyboard layout
------
How to initiate automatic execution of commands upon keyboard layout switch?
I am afraid switching sources is a built in function of Unity, which is not available as a cli option from outside. However, that does not mean we have no options to achieve exactly what you want.Replacing the original shortcutInput sources can be fetched by the command:Output looks like:The layout can be set with the command:This way, we can replace the keyboard shortcut by a scripted version to switch to the next language and run your command at the same time. That's it. Now changing language is combined with the command you want to run along.Using gsettings is extremely low on juice, and by combining the command to set the language with your commands, the script only runs when changing language. I believe that is the most elegant way and, although you wo not notice in your electricity bill, on long term the lowest on resources. The choice between a constantly running process, using the API, or a run-when-called option is a matter of taste however.Note also that the script first changes language and then runs the other commands. There is no noticeable difference in response in the two answers whatsoever.
------
How to remove or disable a default keyboard layout?
Apple's response to my bug report, in which I was asking to make it possible to remove the system default keyboard layout if another one is selected through System Preferences:
------
Problem keyboard layout in boot with LUKS
I use luks encryption for home and root files. If it can help some guysAdd thisand also check thisIt MUST be in the good orderRegenerate initrd
------
Which keyboard layout do you prefer for programming?
I really do not care as long it is not cramped and consistent. I have the advantage that I never learned to type. This has allowed me to think more as the typing rate is a rate limiting factor. Measure twice (mentally compose) and cut once (type). Life is even better with the advent of modern editors, auto complete (in language specifics IDEs) and spell checking. So the advantage of not being able to type is that is makes one virtually immune to developing carpal tunnel syndrome. In 35 odds years on the keyboard, I have seen countless rapid fast typists destroy their wrists for life. I have ridden probably close to 200k miles on fast racing style road bikes (along with lots of instance high force / high velocity foosball) which is also another high risk factor for carpal tunnel syndrome. So focus on treating your wrists and hands carefully, think more and type less. Speed kills.
------
Keyboard layout
The Selectric's keyboard layout put the underscore, hyphen, and single and double quote characters as pairs on their own keys - an arrangement which had already been used on many earlier electric typewriters, including IBM's own Model A onwards. The traditional layout of mechanical typewriters had offered these characters as shifts from digit keys.[a] Electric typewriter designers had made this change because smaller characters need to hit the paper with less force than most, and pairing these characters in this way avoided needing to adjust the force based on shift state. About a decade later, this character pairing was formalized in the American Standards Association X4.14-1971 standard as typewriter pairing (colloquially a typewriter-paired keyboard), along with bit-paired keyboards. Typewriter pairing became the only supported arrangement in the successor X4.23-1982 standard. The Selectric also added a dedicated key for 1 / !. The typist no longer had to use a lowercase L, nor overstrike the single quote and period characters, as had been the practice on most earlier typewriters. These changes were later copied by the IBM Model D electric typewriter (1967), and later still by DEC's VT52 terminal (1975) and the original IBM PC (1981). Typewriter pairing was seen on many other computer keyboards, particularly the influential Model M (1985). The new layout was not universal, however. Internationally, many layouts kept the bit-paired arrangement. This is easily visible in Shift2 yielding ", as on the standard UK layout. The bit-paired symbols are also retained in the Japanese keyboard layout.