Re: Num Lock key in X, PF keys, involves xmodmap, xev

2009-07-05 Thread Paul B. Mahol
On 7/5/09, Polytropon  wrote:
> Additional information, just recognized:
>
> When Num Lock is on (as described in my first message), some window
> manager functions don't work anymore: When doubleclicking on a title
> bar, the window does not roll up. When pressing Alt and dragging a
> window with the left mouse button, the window does not move. If
> Num Lock is switched off, it works as intended. With Num Lock on,
> other things still work, such as pressing Ctrl and Shift and double-
> clicking on the title bar maximizes the window (Ctrl alone maximizes
> vertically, and Shift horizontally). Pressing Alt and clicking left
> on the title bar sets the window into the background. (For most of
> these functionalities, I'd like to use the 2x5 keys on the left as
> I did it with the Sun keyboard.)

Functionality you are seeking is trivial in fvwm2 case.
There is IgnoreModifiers [L][2][5] command.

In syscons(4) case available functionality is somehow limited ...

-- 
Paul
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Num Lock key in X, PF keys, involves xmodmap, xev

2009-07-05 Thread Polytropon
Additional information, just recognized:

When Num Lock is on (as described in my first message), some window
manager functions don't work anymore: When doubleclicking on a title
bar, the window does not roll up. When pressing Alt and dragging a
window with the left mouse button, the window does not move. If
Num Lock is switched off, it works as intended. With Num Lock on,
other things still work, such as pressing Ctrl and Shift and double-
clicking on the title bar maximizes the window (Ctrl alone maximizes
vertically, and Shift horizontally). Pressing Alt and clicking left
on the title bar sets the window into the background. (For most of
these functionalities, I'd like to use the 2x5 keys on the left as
I did it with the Sun keyboard.)


-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Num Lock key in X, PF keys, involves xmodmap, xev

2009-07-05 Thread Polytropon
Dear list,

since I moved to a new keyboard, I have some trouble. Everything except
the Num Lock functionality works fine. Let me explain:

The keyboard is a BOSCOM PS/2 keyboard (with 122 keys, intended for
5250 operations on a PC) that contains a keyboard controller, so the
keyboard can simply be attached to the PC.

THis is how the keyboard looks like:

http://www.ioconnections.com/images/products/bos_5250keyboard_black.jpg

It's a very nice one, so I want to use it instead of my Sun USB keyboard
because it has more and better keys. Think about the IBM model M. Same
mechanics.

The keyboard can operate in two different modes, which are selected by a
jumper inside the keyboard (where the LEDs are located).

In "jumper mode", keys operate like their caption (the key cap) indicates
it. For example, the keys on the left generate SysRq, Print, Escape and
so on. Some of them generate composed characters, this means when I press
a key, the keyboard sends a key combination, such as Alt+F3 for the
key or Shift+F1 for F13. Quite useless.

In "no jumper mode", each key sends a unique keycode. Some keys do not
do what their key cap says, but that's no problem because the caps can
be re-arranged. And I've got enough space keycaps with very nice
captions from other keyboards, so it's no problem to make my own
layout be represented correctly by the key caps.

This is the mode I need.

Using the xev program, I could easily find out which keys generate which
keycode, so I made a .xmodmaprc and assigned names to the different keys
according to what I intended them to use. For example, F13 .. F24 now are
described as F13 .. F24, so they can be assigned several actions by the
means of the window manager, i. e. WindowMaker - easy game, e. g. starting
programs or issuing a window arrangement command (front, background, roll
up, hide, lock screen and so on). On the numerical keypad, I have a comma
as well as a dot - in Germany, the comma is the decimal delimiter, so it's
not possible to type IPs on the numeric keypad only. But now, I can do
things like "192.168.1.1,192.168.1.2" all within the numerical keypad.

Now my problem: I can't get the Num Lock to work. First of all, I checked
which keycode would be generated when I press the key I want to have as
Num Lock - it's the one placed where it should be on the standard 102
keys model, numerical keypad, upper left.

This is the xev output when the key is pressed:

KeyPress event, serial 27, synthetic NO, window 0x181,
root 0x73, subw 0x0, time 1285024705, (76,91), root:(355,651),
state 0x0, keycode 9 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False 

The keycode 9 (former Escape, I think) has been assigned to the
key symbol Num_Lock by this entry in .xmodmaprc (file attached,
I hope):

! Num
keycode 9 = Num_Loc

The comment, preceeded by "!", states what is on the key cap, to make
finding them easier.

The problem is: Pressing this key doesn't change the Num state. So I
checked "man xmodmap" and found out that there are modes that can be
changed by certain keys.

% xmodmap
xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):
shift   Shift_L (0x32),  Shift_R (0x3e)
lockCaps_Lock (0x42)
control Control_L (0x25),  Control_R (0x6d)
mod1Alt_L (0x40),  Meta_L (0x9c)
mod2Num_Lock (0x4d)
mod3  
mod4Super_L (0x7f),  Hyper_L (0x80)
mod5Mode_switch (0x5d),  ISO_Level3_Shift (0x71),  
ISO_Level3_Shift (0x7c)

This output states that Num_Lock toggles "mod2" - is this the Num mode?
I checked it through this command:

% xmodmap -e "add mod2 = Num_Lock"

Ha! Pressing this key toggles Num now. Fine. No, not fine. Problem: The
keys on the left as well as the 2nd row of function keys does not work
anymore. If I switch off Num, they work again. Huh? I didn't have that
on the Sun keyboard, there using the keys on the left (which I assigned
F13 .. F27) always worked, no matter if Num was on or off.

However, xev tells me that the correct symbols are emitted when I press
the key, but the actions that have been assigned don't work anymore. So,
for example, F13 doesn't launch Opera anymore.

KeyPress event, serial 27, synthetic NO, window 0x181,
root 0x73, subw 0x0, time 1285459063, (175,3), root:(362,537),
state 0x10, keycode 181 (keysym 0xffca, F13), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False

But when I turn Num off and press F13, it works again. And as I said, I
didn't have such kind of behaviour with the Sun model. Basically, I'm
doing the same.

What am I doing wrong here? What am I missing? Ideas, anyone? =^_^=



PS. Follow-up questio