Autodetecting keyboard type - X

This is a discussion on Autodetecting keyboard type - X ; Is it possible to autodetect the type of keyboard attached to a computer? I have two machines with japanese keyboards, and two machines with us keyboards. Is it possible to autodetect which keyboard is attached when X starts up? I'm ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Autodetecting keyboard type

  1. Autodetecting keyboard type

    Is it possible to autodetect the type of keyboard attached to a computer?

    I have two machines with japanese keyboards, and two machines with us
    keyboards. Is it possible to autodetect which keyboard is attached when X
    starts up?

    I'm probably going to add an entry in /etc so that users can set the
    keyboard type from their .xsession file, but it would be kind of neat to
    autodetect it....

    Thanks.

  2. Re: Autodetecting keyboard type

    Captain Dondo wrote:
    > Is it possible to autodetect the type of keyboard attached to a computer?
    >
    > I have two machines with japanese keyboards, and two machines with us
    > keyboards. Is it possible to autodetect which keyboard is attached when X
    > starts up?
    >
    > I'm probably going to add an entry in /etc so that users can set the
    > keyboard type from their .xsession file, but it would be kind of neat to
    > autodetect it....


    As far as I know, autodetect ain't working, mostly for keyboards are quite dum
    and can't really communicate this. If you use a somewhat up to date X Window
    System, you can define more than one keyboard type and allow the user to
    switch the type.


    //Aho

  3. Re: Autodetecting keyboard type

    "Captain Dondo" wrote in message
    newsan.2005.01.02.02.51.23.963461@NsOeSiPnAeMr.com

    > Is it possible to autodetect the type of keyboard attached to a
    > computer?
    >
    > I have two machines with japanese keyboards, and two machines with us
    > keyboards. Is it possible to autodetect which keyboard is attached
    > when X starts up?
    >
    > I'm probably going to add an entry in /etc so that users can set the
    > keyboard type from their .xsession file, but it would be kind of neat
    > to autodetect it....


    Since you presumably know what machines have which keyboard, wouldn't it be
    a simple matter to

    echo $DISPLAY | cut -d: -f1

    and take action based on the result?

    --
    use hotmail for email replies


  4. Re: Autodetecting keyboard type

    On Sat, 01 Jan 2005 22:38:53 -0800, ynotssor wrote:

    > "Captain Dondo" wrote in message
    > newsan.2005.01.02.02.51.23.963461@NsOeSiPnAeMr.com
    >
    >> Is it possible to autodetect the type of keyboard attached to a
    >> computer?
    >>
    >> I have two machines with japanese keyboards, and two machines with us
    >> keyboards. Is it possible to autodetect which keyboard is attached
    >> when X starts up?
    >>
    >> I'm probably going to add an entry in /etc so that users can set the
    >> keyboard type from their .xsession file, but it would be kind of neat
    >> to autodetect it....

    >
    > Since you presumably know what machines have which keyboard, wouldn't it be
    > a simple matter to
    >
    > echo $DISPLAY | cut -d: -f1
    >
    > and take action based on the result?



    I'm using Fedora Core, which stores the keyboard type in
    /etc/sysconfig/keyboard... But I have one laptop which could have
    whatever keyboard is handy attached to it... So I figured it would be
    kind of neat to autodetect it if it could be done.

    --Yan


  5. Re: Autodetecting keyboard type

    "Captain Dondo" wrote in message
    newsan.2005.01.02.15.13.45.639273@NsOeSiPnAeMr.com

    >>> Is it possible to autodetect the type of keyboard attached to a
    >>> computer?

    [...]
    >> Since you presumably know what machines have which keyboard,
    >> wouldn't it be a simple matter to
    >> echo $DISPLAY | cut -d: -f1
    >> and take action based on the result?

    >
    > I'm using Fedora Core, which stores the keyboard type in
    > /etc/sysconfig/keyboard... But I have one laptop which could have
    > whatever keyboard is handy attached to it... So I figured it would be
    > kind of neat to autodetect it if it could be done.


    You may then wish to compare the results of "xmodmap -pk" on the different
    keyboards and look for a distinctive difference, which you could then query
    for as part of the login process.

    --
    use hotmail for email replies


+ Reply to Thread