.jwmrc and the "windows" key (Super_L) [solved]

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
xophist
Posts: 26
Joined: Mon 10 Dec 2012, 17:00
Location: Coastal Texas

.jwmrc and the "windows" key (Super_L) [solved]

#1 Post by xophist »

Running slacko5.4 (Linux puppypc23129 3.2.33-4g)

"jwm -v":
JWM vsvn-581 by Joe Wingbermuehle
compiled options: confirm fribidi icons png shape xft xinerama xpm xrender
system configuration: /etc/system.jwmrc

Goal: to use the "windows" key in a manner like Alt and Ctrl keys (as modifier key)

Problem: no mask value I've tried works for my windows key.

My .jwmrc has "includes" to other jwm files commented out:
<!--
<Include>/root/.jwm/jwmrc-tmp</Include>
<Include>/root/.jwm/jwmrc-install</Include>
<Include>/root/.jwm/jwmrc-theme</Include>
<Include>/root/.jwm/jwmrc-personal</Include>
-->

So I don't think my additions to .jwmrc are being overidden elsewhere.

The logical choice is mask="P", since xev identifies my windows key as Super_L:

<Key mask="P" key="d">showdesktop</Key>

I've tried other actions, so it's not a showdesktop issue. For example,
<Key mask="P" key="r">exec:jwm -restart</Key> doesn't work either.

Both "showdesktop" and "exec:jwm -restart" work with other masks (S,A,C) and their corresponding keys. I expected P to work for the windows Super_L key.

The only mask values for .jwmrc I know of are S,A,C,P,H,M. None of these masks works for the "windows" key.

Any ideas?

EDIT:

The values S,A,C,P,H,M were suggested by the jwmconfig gui. I've looked at the source and can't see P,H, or M defined or used anywhere. So mask="P" can't work. The reference to P, H, M in the jwmconfig window might be misleading.
Last edited by xophist on Thu 20 Dec 2012, 02:51, edited 1 time in total.

xan
Posts: 54
Joined: Sun 25 Nov 2012, 12:27

#2 Post by xan »

Go to:
/root/.jwm/jwmrc-personal

Open with text editor and add the following line near the bottom:
<Key keycode="115">root:3</Key>

That brings up the puppy applications menu by pressing the Windows key.

If you want to use the Windows key as a modifier then I read that the mask value is "4" but I can't get it to work. It says something about: "Note that physical key which determines the mask can be configured using the "xmodmap" program."

So to run HTOP by pressing Win and h:
<Key mask="4" key="h">exec:rxvt -e htop</Key>

User avatar
xophist
Posts: 26
Joined: Mon 10 Dec 2012, 17:00
Location: Coastal Texas

#3 Post by xophist »

If you want to use the Windows key as a modifier then I read that the mask value is "4" but I can't get it to work.
I'd like to know where you found that vital info. It is correct, but I couldn't find any reference to a mask value of 4 in the docs.
So to run HTOP by pressing Win and h:
<Key mask="4" key="h">exec:rxvt -e htop</Key>
mask="4" does indeed work for the Super_L key ("Windows" key).

Thank you!

I've since looked at the code, and it appears that the values P, H, M are not defined or used. So my effort with mask="P" was futile. The values P, H, M were listed in the jwmconfig gui, but I don't think they work.

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#4 Post by anikin »

xan wrote:Go to:
/root/.jwm/jwmrc-personal

Open with text editor and add the following line near the bottom:
<Key keycode="115">root:3</Key>

That brings up the puppy applications menu by pressing the Windows key.
Hi xan,

This is one awesome tip!
To be able to get the menu without having to touch the dreaded touchpad - it makes a big difference to me.
... and I wonder, why this key doesn't come enabled in modern puppies - it was functional in Jemimah's pupeee.

Many thanks to you for sharing.

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#5 Post by npierce »

xophist wrote:I've since looked at the code, and it appears that the values P, H, M are not defined or used. So my effort with mask="P" was futile. The values P, H, M were listed in the jwmconfig gui, but I don't think they work.
The "Quick Info" text that lists the possible mask values in the JWM Configuration Manager, was written in 2005, the same year that forum member thoughtjourney wrote that utility. Sometime in late March or early April of 2010, JWM switched from the old values that it had used for modifier keys to values based on the modifier names used by X. (JWM version svn-470 had the old values, version svn-474 had the new.)
xophist wrote:The reference to P, H, M in the jwmconfig window might be misleading.
Yes. The "Quick Info" text needs to be updated. Thanks for reporting this. I will file a bug report in the bugs forum.

[UPDATE: Bug report submitted: http://www.murga-linux.com/puppy/viewto ... 053#673053
xophist wrote:I'd like to know where you found that vital info. It is correct, but I couldn't find any reference to a mask value of 4 in the docs.
I'm not sure about other Puppies, but in the JWM Configuration manager that comes with Slacko 5.3.3, there is a Help button in the Keyboard Shortcuts dialog below the "Quick Info" text. If you are on-line, that button will take you to the Key Bindings section of the JWM Configuration page, which lists the new values used for masks:
A - Alt (mod1)
C - Control
S - Shift
1 - mod1
2 - mod2
3 - mod3
4 - mod4
5 - mod5
But it doesn't give any hints about what keys are associated with "mod2" through "mod5". That is because those keys may be different for different key maps. To see what keys are mapped to "mod1" through "mod5" on your PC, use the xmodmap -pm command. Here is what it reports when using the default "us" keymap in Slacko 5.3.3:

Code: Select all

# xmodmap -pm
xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40),  Alt_L (0x7d),  Meta_L (0x9c)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x7f),  Hyper_L (0x80)
mod5        Mode_switch (0x5d),  ISO_Level3_Shift (0x7c)
(To avoid confusion, it is best to simply look at the keysyms, not the keycodes. For instance, you may note that the keycode value for "mod4" doesn't match the keycode of your "<LWIN>" key. That is because "mod4" is actually associated with a "fake" key known as "<SUPR>", which is also mapped to "Super_L". You needn't be concerned with that, but if curious, it all happens -- at least for the "us" keymap -- in /etc/X11/xkb/symbols/pc/pc.)

The xmodmap utility can also be used to change the modifier map. For instance:

Code: Select all

# xmodmap -e "add mod3 = Menu"
# xmodmap -pm
xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40),  Alt_L (0x7d),  Meta_L (0x9c)
mod2        Num_Lock (0x4d)
mod3        Menu (0x75)
mod4        Super_L (0x7f),  Hyper_L (0x80)
mod5        Mode_switch (0x5d),  ISO_Level3_Shift (0x7c)
As you can see, my Menu key can now be used for "mod3".

It can be removed again with:

Code: Select all

xmodmap -e "remove mod3 = Menu"
or:

Code: Select all

xmodmap -e "clear mod3"
See the xmodmap man page for more details.

anikin wrote:To be able to get the menu without having to touch the dreaded touchpad - it makes a big difference to me.
... and I wonder, why this key doesn't come enabled in modern puppies - it was functional in Jemimah's pupeee.
Try your F12 key. Traditionally that has been the key used for the menu in most (if not all) Puppies, perhaps because Puppy is sometimes used with keyboards that have no Windows key (or perhaps because just the thought of touching anything with a Windows logo on it gives shivers to some folks :) ).

User avatar
xophist
Posts: 26
Joined: Mon 10 Dec 2012, 17:00
Location: Coastal Texas

#6 Post by xophist »

npierce,

Thank you for your help and very informative post.

There are many useful tidbits in your post, and they are sure to be helpful to many.

Thanks for your time and effort in making this valuable contribution.

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#7 Post by npierce »

You're welcome.

I'm glad you found it useful. I too learned a bit while looking into it.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#8 Post by BarryK »

Thanks to npierce, I have updated the help in jwmconfig2:

http://murga-linux.com/puppy/viewtopic. ... 899#680899
[url]https://bkhome.org/news/[/url]

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#9 Post by npierce »

You're welcome.

Thanks for updating the .pet file.

Post Reply