Tremulous Forum

General => Troubleshooting => Topic started by: Spectre on February 28, 2009, 03:23:18 pm

Title: [Solved] Buttons 0 - 9 don't work - Linux
Post by: Spectre on February 28, 2009, 03:23:18 pm
I have a problem with buttons 0 - 9 in tremulous. They don't work... My binds are correctly written in autogen.cfg but buttons don't work...
They work only if I edit /etc/X11/xorg.conf. But it's not a good change, because after reboot I have warning dialog for that and keyboard layouts cannot be switched.

My default xorg.conf:

Code: [Select]
Section "InputDevice"
        Identifier  "Generic Keyboard"
        Driver      "kbd"
        Option      "XkbRules" "xorg"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us"
EndSection

And if I change to ->
Code: [Select]
Option      "XkbRules" "microsoft"

Then it works.... Other people that use linux don't know this problem.
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Archangel on February 28, 2009, 03:53:14 pm
Because you have a Microsoft keyboard. What's your issue? It's called settings, you set them correctly. Try running xorgconfig or similar application.
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Spectre on February 28, 2009, 07:47:13 pm
I should add, I tried to set up model of keyboard Microsoft office, etc, etc..... and still didn't work...
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Archangel on February 28, 2009, 11:01:01 pm
I should add, you should follow my instructions and run xorgconfig as root, without X running..
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Bissig on March 01, 2009, 02:24:27 am
This is my section:

Code: [Select]
Section "InputDevice"
    Identifier     "Keyboard[0]"
    Driver         "kbd"
    Option         "Protocol" "Standard"
    Option         "XkbLayout" "de"
    Option         "XkbModel" "microsoftpro"
    Option         "XkbRules" "xfree86"
    Option         "XkbVariant" "nodeadkeys"
EndSection

Ignore the german layout and nodeadkeys settings.

Also, you don't need a Microsoft keyboard to use that layout.
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Spectre on March 01, 2009, 04:22:19 pm
Bissig: It still doesn't work even when I tried your setting and deleted mine  :'(

Archangel: how? I tried: xorgconf, xorgcfg, Xorg --configure and nothing launches...
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Urcscumug on March 01, 2009, 05:30:04 pm
I'm guessing you mean the numpad keys? Because I find it hard to believe the regular 0-9 keys don't work.

I don't even have an XkbRules line in my xorg.conf and I don't have any issues.

If you run xev and press 0 on the numpad, you should get a few lines, among which one like this:

Code: [Select]
state 0x0, keycode 90 (keysym 0xff9e, KP_Insert), same_screen YES,
Do you get something similar (KP_Insert)?
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Spectre on March 01, 2009, 09:10:09 pm
I pressed num 0 and my output is:

Code: [Select]
KeyRelease event, serial 33, synthetic NO, window 0x3600001,
    root 0xb3, subw 0x0, time 224315, (167,-10), root:(171,12),
    state 0x2010, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

I tried binds on numpad buttons but the same problem :-/ (I hope numpad buttons are /bind 0 say hi too)
And BTW on windows normal 0 - 9 work fine...

Title: Re: Buttons 0 - 9 don't work - Linux
Post by: David on March 01, 2009, 09:23:29 pm
If numlock is on, then its bind 0.  If numlock is off, then its bind KP_0 etc.
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Bissig on March 02, 2009, 12:23:07 am
Would you mind posting all of your xorg.conf?

Also: Do the buttons 0-9 work in chat?
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Spectre on March 02, 2009, 01:49:06 pm
In console and in (T - say, Y - teamsay) buttons work...

My xorg.conf
Code: [Select]

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "ServerLayout"
Identifier     "aticonfig Layout"
Screen      0  "aticonfig-Screen[0]-0" 0 0
EndSection

Section "Files"
EndSection

Section "Module"
EndSection

Section "InputDevice"
    Identifier     "Generic Keyboard"
    Driver         "kbd"
    Option         "Protocol" "Standard"
    Option         "XkbLayout" "us"
    Option         "XkbModel" "microsoft"
    Option         "XkbRules" "xfree86"
    Option         "XkbVariant" "nodeadkeys"
EndSection

Section "InputDevice"
Identifier  "Configured Mouse"
Driver      "mouse"
EndSection

Section "Monitor"
Identifier   "Configured Monitor"
EndSection

Section "Monitor"
Identifier   "aticonfig-Monitor[0]-0"
Option     "VendorName" "ATI Proprietary Driver"
Option     "ModelName" "Generic Autodetecting Monitor"
Option     "DPMS" "true"
EndSection

Section "Device"
Identifier  "Configured Video Device"
EndSection

Section "Device"
Identifier  "aticonfig-Device[0]-0"
Driver      "fglrx"
BusID       "PCI:2:0:0"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor    "Configured Monitor"
EndSection

Section "Screen"
Identifier "aticonfig-Screen[0]-0"
Device     "aticonfig-Device[0]-0"
Monitor    "aticonfig-Monitor[0]-0"
DefaultDepth     24
SubSection "Display"
Viewport   0 0
Depth     24
EndSubSection
EndSection

And I use Debian Lenny + gnome if it matters...
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: KillerWhale on March 02, 2009, 02:09:17 pm
I tried binds on numpad buttons but the same problem :-/ (I hope numpad buttons are /bind 0 say hi too)
And BTW on windows normal 0 - 9 work fine...

You have to bind whatever else is on the key, not the number.

So, 0 would be KP_ins, 1 would be kp_end, 2 would be kp_downarrow, etc.
The exception to this rule is 5, which is kp_5.

As for your issue that the number keys only work in console/chat, I have no clue.
Are you sure you're binding them correctly?
Try
Code: [Select]
/bind 1 echo "Hey nub, I work"
It's always good to rule out misbinding first, before you blame your config.

Hope you can get that working,
Whales
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Spectre on March 02, 2009, 11:22:03 pm
Great, if I bind KP_ins and such then it works! But I'm still a little confused why normal 0 - 9 don't work  ???
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Archangel on March 03, 2009, 12:29:18 am
Be more specific. Top of the keyboard numbers? Or keypad with numlock on?
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Bissig on March 03, 2009, 01:28:16 am
Well Spectre, time to post your binds *g*
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Spectre on March 03, 2009, 09:30:30 am
I meant numbers on top don't work...

But I had the last idea -> try XFCE... when I installed it, both numbers work.
But in gnome don't.  I didn't try KDE, because it's too big for download.
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Spectre on March 03, 2009, 11:52:27 am
Installed kde-base -> both buttons work too.... numpad and top numbers  ;D
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Archangel on March 03, 2009, 05:07:01 pm
If you oh-so-cannot live without Gnome, use XFCE. It's similar enough, you won't be totally lost (if you are a nub)
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Urcscumug on March 03, 2009, 06:54:52 pm
It probably has to do with the keyboard configuration under Gnome. When you have the time, and if you want to keep using Gnome, try tinkering with stuff under Sytem/Preferences/Keyboard from the top menu (that's Keyboard, not Keyboard Shortcuts). It usually has to do with the keyboard layout or other special tweaks. Being a Microsoft keyboard may have something to do with it, if it's also a multimedia keyboard (and they usually are).
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Spectre on March 03, 2009, 11:59:10 pm
I gave it many hours of searching, trying anything... I won't any more.

Thank you everyone for help  ;)
Title: Re: Buttons 0 - 9 don't work - Linux
Post by: Bissig on March 04, 2009, 01:07:36 am
So, Gnome even fails at keyboards... fail.