Subject: Re: Keyboard mappings -- strange...

From: "Tim Freedom" <[email-masked]>
Date: Tue, 22 Aug 2000 17:53:30 PDT

On Sat, 19 Aug 2000 19:44:16 +0300, Mikhael Goikhman wrote:
>
>On 14 Aug 2000 10:34:19 -0700, Tim Freedom wrote:
> > > I'm having alot of strange problems with my key mappings which > don't 
>appear on any of my other systems.  Both the Ctrl-Lock and
> > the Num-Lock are off (disabled) and I tried toggling them just in
> > case too (so it ain't them :-)
> > > I have the following in my .fvwm2rc file
>[...]
> > > Key KP_9        A       C       GotoPage 2 0
> > > Key KP_7        A       M       WarpToWindow 50p 50p
> > > Key Left        A       C       Scroll -100 +0
> > Key Right       A       C       Scroll +100 +0
> > Key Up          A       C       Scroll +0   -100
> > Key Down        A       C       Scroll +0   +100
> > > This is what's happening.
> > Ctrl-7, Ctrl-4, Ctrl-5, Ctrl-6, and Ctrl-1 all work properly.
> > Ctrl-8, Ctrl-9, Ctrl-2 and Ctrl-3 do NOT for some reason (why
> > ?????).
> > > As for the arrow keys, the up and down don't seem to do anything
> > at all.  The left and right function as though they are 'GotoPage
> > 0 1' and 'GotoPage 2 1' respectively.  Again, Why ??????
>
>I am not familar much with sun keyboards, so probably there is a sun
>specific solution here, but generally this is probably a X Server
>related problem, not fvwm's. Try to run xev(1) and see whether KP_9
>is really generated when you press 9 (with or without Ctrl). You can
>use xmodmap(1) to alter mappings.
>
> > Besides that my Meta (or Alt -- Diamond key on Sun's keyboard)
> > doesn't work unless I'm using Emacs or Netscape.  In Fvwm it
> > doesn't seem to have any affect.
>
>Again, xev can answer what this key generates.
>
> > Could someone please tell me what I'm doing wrong.  As noted, this
> > all works on my linux box and on the previous Ultra-5 that I had
> > (different OS though).
> > > uname -a:       SunOS klepto 5.7 Generic_106541-10 sun4u
> > fvwm version:   fvwm-snap-20000809 (with xpm support)
>

Mikhael et all.  A couple of things to follow-up on..  I tried a Talk form 
so as to attempt to debug (I'll attach a simplified configuration file 
below):

When I press Ctrl-arrow-up, I get,
[FVWM][ExecuteFunction]: <<ERROR>> No such command 'MIT-MAGIC-COOKIE-1'

When I press KP_8, I get,
[FVWM][ExecuteFunction]: <<ERROR>> No such command 'MIT-MAGIC-COOKIE-1'

Pressing SC arrows works fine.  Pressing Ctrl-arrows doesn't work properly; 
as noted above Ctrl-left and Ctrl-right function as though they are GotoPage 
0 1 and GotoPage 2 1.  Ctrl-up and Ctrl-down don't modify the view at all.

KP_0 doesn't function properly.

I also took your advice Mikhael about xev.

If num_lock is NOT active

pressing KP_5 gives me,

KeyRelease event, serial 23, synthetic NO, window 0x6800001,
    root 0x2a, subw 0x0, time 623342502, (43,114), root:(87,383),
    state 0x0, keycode 99 (keysym 0xffdc, F31), same_screen YES,
    XLookupString gives 0 characters:  ""

pressing KP_4 gives me,

KeyPress event, serial 23, synthetic NO, window 0x6800001,
    root 0x2a, subw 0x0, time 623343471, (43,114), root:(87,383),
    state 0x0, keycode 98 (keysym 0xff51, Left), same_screen YES,
    XLookupString gives 0 characters:  ""

If num_lock is active

pressing KP_5 gives me,

KeyRelease event, serial 23, synthetic NO, window 0x6800001,
    root 0x2a, subw 0x6800002, time 623433508, (39,42), root:(83,311),
    state 0x20, keycode 99 (keysym 0xffb5, KP_5), same_screen YES,
    XLookupString gives 1 characters:  "5"

pressing KP_4 gives me,

KeyPress event, serial 23, synthetic NO, window 0x6800001,
    root 0x2a, subw 0x6800002, time 623434196, (39,42), root:(83,311),
    state 0x20, keycode 98 (keysym 0xffb4, KP_4), same_screen YES,
    XLookupString gives 1 characters:  "4"

My 'xmodmap' shows,

xmodmap:  up to 2 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x6a),  Shift_R (0x75)
lock        Caps_Lock (0x7e)
control     Control_L (0x53)
mod1        Alt_L (0x1a)
mod2        Mode_switch (0x14)
mod3        Num_Lock (0x69)
mod4        Meta_L (0x7f),  Meta_R (0x81)
mod5

I attempted, per FAQ, to 'xmodmap -e "clear Mod3"' but nothing improved.

What should I do to get the KP_* and arrow key mappings working ????

+ Tim

##########################################################################
# FVWM - Version 2.x (fvwm2) Configuration File
#

##########################################################################
# PATH Setup
#
# Colon seperated unix directory paths for Modules, xpm files, and bitmaps
#
ModulePath /local/users/timf/download/fvwm-0809/libexec/fvwm/2.3.21
ImagePath 
/local/users/timf/.fvwm/pixmaps:/local/common/lib/pixmaps:/usr/openwin/include/X11/bitmaps

############################################################################
# COLORS and FONTS
#
# Set the fore and back border colors for the window that has focus
HilightColor            White Red

############################################################################
# KEYBOARD Setup

# Arrow Keys
# press arrow + control anywhere, and scroll by 1 page
Key Left	A	C	Scroll -100 +0
Key Right	A	C	Scroll +100 +0
Key Up		A	C	Scroll +0   -100
Key Down	A	C	Scroll +0   +100

# press arrow + meta key, and scroll by 1/10 of a page
Key Left	A	M	Scroll -10  +0
Key Right	A	M	Scroll +10  +0
Key Up		A	M	Scroll +0   -10
Key Down	A	M	Scroll +0   +10

# press shift arrow + control anywhere, and move the pointer by 1% of a page
Key Left	A	SC	CursorMove -1 +0
Key Right	A	SC	CursorMove +1 +0
Key Up		A	SC	CursorMove +0 -1
Key Down	A	SC	CursorMove +0 +1

# press shift arrow + meta key, and move the pointer by 1/10 of a page
Key Left	A	SM	CursorMove -10 +0
Key Right	A	SM	CursorMove +10 +0
Key Up		A	SM	CursorMove +0  -10
Key Down	A	SM	CursorMove +0  +10
# kEYboard accelerators

Key KP_Decimal	A	C	Prev [ CurrentPage !iconic] FlipFocus
Key KP_0	A	C	Prev [!CurrentPage !iconic] FlipFocus
Key KP_1	A       C       GotoPage 0 2
Key KP_2	A       C       GotoPage 1 2
Key KP_3	A       C       GotoPage 2 2
Key KP_4	A       C       GotoPage 0 1
Key KP_5	A       C       GotoPage 1 1
Key KP_6	A       C       GotoPage 2 1
Key KP_7	A       C       GotoPage 0 0
Key KP_8	A       C       GotoPage 1 0
Key KP_9	A       C       GotoPage 2 0

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]