LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Environment variable containing the current keyboard layout (https://www.linuxquestions.org/questions/linux-newbie-8/environment-variable-containing-the-current-keyboard-layout-808569/)

_ON 05-18-2010 06:21 AM

Environment variable containing the current keyboard layout
 
Hi.

I have two keyboard layouts installed in my system and I need to determine in scripts which one I'm on. What the environment variable contains indicator of current keyboard layout?

Debian GNU/Linux 5.0.4;
GNOME 2.22.3.

kurwongbah 05-18-2010 11:04 PM

Hi there!

If I remember correctly, keyboards are physically attached and thus belong to a specific hardware configuration.

In Fedora/RedHat you can find the configuration for the attached keyboard device in: /etc/sysconfig/keyboard

Once you log in to a remote system you'll be given a tty, tty's use a terminal emulationspecific
This emulation -so to speak- maps your physical keyboard keys into a 'virtual' key map generic for a certain terminal.
Terminal emulations are abundant, but usually refer to a standardized keyboard layout from a major OEM (from times long gone...)
The type of emulation for your current session can be found in the env variable called: TERM


All times are GMT -5. The time now is 12:46 AM.