Author Topic: xmodmap question  (Read 2665 times)

0 Members and 1 Guest are viewing this topic.

Offline theferenc

  • Thread Starter
  • Posts: 1327
xmodmap question
« on: Tue, 08 February 2011, 16:50:17 »
Not sure if this should be in the keyboard forum, but it is about keyboard remapping, so here goes.

So, after remapping my keyboard via xmodmap, I seem to have lost any ability to access asciitilde (to use xmodmap's term).

I swapped keycode 22 from "BackSpace Terminate_Server" to "grave asciitilde". The problem is, I can't seem to access the shift character. It just beeps at me, though sometimes it just gives me the grave character for both shifted and unshifted.

This is the only problem I've run into with remapping. Any help would be greatly appreciated.
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball

Offline Minskleip

  • Posts: 230
xmodmap question
« Reply #1 on: Tue, 08 February 2011, 16:54:08 »
Do you have any other keys remapped right now? Do you use ubuntu or similar crap?
What\'s in the back of my car? A cdr lol

Split Tipro keyboard with R3 keycaps

Offline HaaTa

  • Master Kiibohd Hunter
  • Posts: 794
  • Location: San Jose, CA, USA
  • Kiibohds!
    • http://kiibohd.com
xmodmap question
« Reply #2 on: Tue, 08 February 2011, 16:56:48 »
That's strange, what does your `xmodmap -pke` say for keycode 22?


I really gotta get around to finishing my writeup for an XModMap wiki one of these days.
Kiibohd

ALWAYS looking for cool and interesting switches
I take requests for making keyboard converters (i.e. *old keyboard* to USB).

Offline theferenc

  • Thread Starter
  • Posts: 1327
xmodmap question
« Reply #3 on: Tue, 08 February 2011, 16:57:53 »
Yeah, that likely would have been useful info.

It's RHEL 5, and this problem was discovered after a remap of ESC, grave, pipe, backspace, caps lock, and control. I backed each one out, restoring the original map each time prior to trying again. I got the original map via

Code: [Select]
xmodmap -pm -pke

and created a file that replicated it. I tested this several times to ensure it was, in fact, correct, and then used that as a sort of "clean slate" to ensure I wasn't carrying over additional crap between attempts.

I backed out everything else except

Code: [Select]
keycode  22 = grave asciitilde

and it is still screwed up.
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball

Offline HaaTa

  • Master Kiibohd Hunter
  • Posts: 794
  • Location: San Jose, CA, USA
  • Kiibohds!
    • http://kiibohd.com
xmodmap question
« Reply #4 on: Tue, 08 February 2011, 16:58:47 »
Ah, that may be the problem. What's your XServer and xkb and kernel versions?
Kiibohd

ALWAYS looking for cool and interesting switches
I take requests for making keyboard converters (i.e. *old keyboard* to USB).

Offline theferenc

  • Thread Starter
  • Posts: 1327
xmodmap question
« Reply #5 on: Tue, 08 February 2011, 17:01:49 »
It's standard RHEL 5, with kernel version  2.6.18-194.26.1.el5.

As far as the rest, I honestly I have no idea. I can certainly find that info, if it would help. I did find that the version of X for OS X has a bug that using xmodmap at all kills the use of the ~ character.

I can certainly put in a support ticket for all of this, but I figured I would ask here, since a lot of folks seem to have a solid grasp on this. Oddly enough, this is so much easier in windows...
« Last Edit: Tue, 08 February 2011, 17:04:32 by theferenc »
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball

Offline theferenc

  • Thread Starter
  • Posts: 1327
xmodmap question
« Reply #6 on: Tue, 08 February 2011, 17:03:37 »
I've used xmodmap for years for these sorts of things, and I've never run in to this issue before. It's really quite wacky, considering there is no reason it shouldn't work.

Is "Terminate_Server" something that has to be removed first?
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball

Offline HaaTa

  • Master Kiibohd Hunter
  • Posts: 794
  • Location: San Jose, CA, USA
  • Kiibohds!
    • http://kiibohd.com
xmodmap question
« Reply #7 on: Tue, 08 February 2011, 17:05:27 »
Another potential solution before you reply.

xmodmap changes are heavily dependent upon the current xkb layout applied to the XServer (some layers can be outright disabled, and cannot be modified until re-enabled with a more "complex" xkb layout).

Currently the most complex layout is `setxkbmap ca -variant multix`, a Canadian multilingual layout actually.

(Just saw your new replies, I'll post this, then read the info).
Kiibohd

ALWAYS looking for cool and interesting switches
I take requests for making keyboard converters (i.e. *old keyboard* to USB).

Offline Minskleip

  • Posts: 230
xmodmap question
« Reply #8 on: Tue, 08 February 2011, 17:07:00 »
You can try to just start X and an xterm and try. Gnome is very bad with xmodmap in my experience.
What\'s in the back of my car? A cdr lol

Split Tipro keyboard with R3 keycaps

Offline HaaTa

  • Master Kiibohd Hunter
  • Posts: 794
  • Location: San Jose, CA, USA
  • Kiibohds!
    • http://kiibohd.com
xmodmap question
« Reply #9 on: Tue, 08 February 2011, 17:10:20 »
Ah, I've had issues with CentOS on the same kernel version for XModMap.

What does the output of `xev` give you when you try the key (keycode 22) with shift?

Also, this may be an issue at a lower level. You can check this using `sudo showkey -s` and check the values when you use shift and not. Compare it with the other keys. However, X "shouldn't" be looking through loadkeys to get the keycodes.

If you want to try fixing the showkey output, you'll have to delve into loadkeys (I do have mostly complete documentation/wiki on the subject). As well as some configs (but they are for later kernel version, so probably won't work).
« Last Edit: Tue, 08 February 2011, 17:14:30 by HaaTa »
Kiibohd

ALWAYS looking for cool and interesting switches
I take requests for making keyboard converters (i.e. *old keyboard* to USB).

Offline theferenc

  • Thread Starter
  • Posts: 1327
xmodmap question
« Reply #10 on: Tue, 08 February 2011, 17:13:18 »
If only I had admin access to this machine. It's a departmental workstation, so I'm strictly userland. I'll check xev as soon as I can (currently at home, xev doesn't like to remote in my experience).

My issue is that 22 is normally backspace, and that there is some issue with the "zap" functionality that was traditionally mapped to shift+backspace. Quite often this is explicitly disabled, due to too much user error. Is that what I could be running into?
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball

Offline HaaTa

  • Master Kiibohd Hunter
  • Posts: 794
  • Location: San Jose, CA, USA
  • Kiibohds!
    • http://kiibohd.com
xmodmap question
« Reply #11 on: Tue, 08 February 2011, 17:16:24 »
That is probably it. Shift+Backspace is being disabled somehow, most likely on the server.

Though I'm not really aware of any methods of doing that.
Kiibohd

ALWAYS looking for cool and interesting switches
I take requests for making keyboard converters (i.e. *old keyboard* to USB).

Offline theferenc

  • Thread Starter
  • Posts: 1327
xmodmap question
« Reply #12 on: Tue, 08 February 2011, 17:41:40 »
There was, not sure if it's still there, a "NoZap" option in the xorg.conf file. Basically, it disabled zap, as you would expect from the name.

Theoretically, it was supposed to intercept the Terminate_Server symbol prior to it hitting the xserver. Looks like they might have hard coded the expected key code though, rather than the symbol it is generating.

Guess it's support ticket time. I hate those.
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball