hyper- meta- super- qualifier keys on Puppy

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
miriam
Posts: 373
Joined: Wed 06 Dec 2006, 23:46
Location: Queensland, Australia
Contact:

hyper- meta- super- qualifier keys on Puppy

#1 Post by miriam »

I've often looked at the special Windows keys on my keyboard and wished I knew enough about how keys are defined in Puppy so that I could use them. Well, today I stumbled across something that surprised me: they are already usable as various (rather odd) keys and key-combinations.

Try this (note that I've only tried it on Puppy 2.16 so far):
  • Right-click one of the icons on your Puppy desktop.
  • Choose Edit Item from the pop-up menu
  • A small dialog box now displays. Near its bottom is a button with The keyboard shortcut is: written above it. The button is labelled (click to set). Click it.
  • Now a small, borderless window waits for you to enter some key-combination, prompting you with the text Press the desired shortcut (e.g. Control+F1). Do as it says, but use a Windows keys as a key-modifier the same way you would use shift or control or alt. For instance if you have chosen the Home icon, try pressing one of the two Windows keys, and while holding it down, press the h key.
  • The borderless window will disappear.
Now look at what is printed in the button you clicked. It says Hyper + h. When used as a simple qualifier key, the left or right Windows key can be used as a Hyper key. From now on if you press the Hyper+h key-combination, even inside applications, Puppy will open a rox-filer window at /root.

But that's not all. Try instead, when setting the key shortcut, just one of the Windows keys alone. Don't press any other keys. Now the button will display Hyper+Super_L if you pressed the left Windows key, or Hyper+Super_R if you pressed the right Windows key. The one key acts as though you'd pressed the hyper key and the left or right super key. Though there doesn't appear to be a super key currently assigned.

And it gets even stranger. Try pressing the left control key, then the left Windows key, and release the left Windows key. This results in the key shortcut being Control+Hyper+Super_L. Now try it the other way around. Now the shortcut is Control+Hyper+Control_L. So not only the key-combination matters, but in some case the order too.

Next to the right Windows key is another special Microsoft key: the menu key. It doesn't work as a modifier key. Pressing it is recorded as Menu.

Computers commonly have shift, control, and alt keys, but older, specialised machines also had hyper, super, and meta keys too. In fact Emacs uses those, but sets them up as weird key-combinations themselves. I would love to be able to use the three special Microsoft keys as those special modifiers. It would make the keyboard effectively 8 times bigger, because any key could then have the extra 3 qualifier keys in various combinations.

Anybody know how to change their definitions so I can do this?
Last edited by miriam on Wed 12 Sep 2007, 20:22, edited 1 time in total.
[color=blue]A life! Cool! Where can I download one of those from?[/color]

davec51
Posts: 530
Joined: Thu 13 Apr 2006, 22:31
Location: Virginia

Assigning Windows Keys

#2 Post by davec51 »

Super-cool! Thanks.

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#3 Post by darkcity »

the window doesn't say super on my Puppy (5.29)

for example,

super+d

just returns "d"

--

also

Super = Windows key

but what about Hyper and Meta?

bones01
Posts: 371
Joined: Mon 11 Aug 2008, 07:47
Location: Melbourne, Aus

#4 Post by bones01 »

This is great, but I also have limits.

I'm using a Dell Latitude D630, Puppy 528 Frugal. This laptop only has one windows key and that's to the left of the space bar. If I try to use just that, it reads "Hyper+Super_L" - but it doesn't work. If I combine it with the CTRL key, I still get nothing. It seems the Windows key ain't working (just like the volume keys too.)

I'd love to use the windows key to open Rox, but :cry:

Still a cool guide.

Bones
Dell Latitude D630 running Puppy 5.2.8 frugal, Macpup 525 frugal (if I can get it working again. Sadly, I couldn't get it fixed :? )
Precise Puppy 5.4 live DVD
Precise 5.7.3 on USB

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#5 Post by darkcity »

Hi Bones,

Have you ensured that Super is mapped to windows key in Xkb?

Mouse/Keyboard Wizard > Advanced XOrg keyboard > Option > Alt/Win key behaviour > altwin: super_win Super is mapped to Win-Keys (default)

Also, what window manager are you using - should be possible to get Windoze to open Rox :twisted:

bones01
Posts: 371
Joined: Mon 11 Aug 2008, 07:47
Location: Melbourne, Aus

#6 Post by bones01 »

I'm now using JWM. I've discovered that OpenBox won't allow my media keys to work.

I'll try the other suggestion soon.
Thanks.
Dell Latitude D630 running Puppy 5.2.8 frugal, Macpup 525 frugal (if I can get it working again. Sadly, I couldn't get it fixed :? )
Precise Puppy 5.4 live DVD
Precise 5.7.3 on USB

bones01
Posts: 371
Joined: Mon 11 Aug 2008, 07:47
Location: Melbourne, Aus

#7 Post by bones01 »

darkcity wrote:Hi Bones,

Have you ensured that Super is mapped to windows key in Xkb?

Mouse/Keyboard Wizard > Advanced XOrg keyboard > Option > Alt/Win key behaviour > altwin: super_win Super is mapped to Win-Keys (default
Gave it a try. No luck though. Doesn't seem that the win-key works. (yet)

Bones.
Dell Latitude D630 running Puppy 5.2.8 frugal, Macpup 525 frugal (if I can get it working again. Sadly, I couldn't get it fixed :? )
Precise Puppy 5.4 live DVD
Precise 5.7.3 on USB

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#8 Post by darkcity »

Try this on Openbox

go to the file /root/.config/openbox/rc.xml

Find the section of code that starts with
<!-- Keybindings for running applications -->

and ends with
</keybind>

replace with

Code: Select all

<!-- Keybindings for running applications -->
    <keybind key="W-e">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>rox</name>
        </startupnotify>
        <command>rox</command>
      </action>
    </keybind>
restart x-server

W-e means WindowKey + "e" - try it and does Rox start?

Just using W doesn't work for me - but I'm using it to drag windows instead of alt-drag

:?:

bones01
Posts: 371
Joined: Mon 11 Aug 2008, 07:47
Location: Melbourne, Aus

#9 Post by bones01 »

darkcity wrote:Try this on Openbox
Thanks for the suggestion, but as my media keys won't work with Openbox (or with XFCE) I'll stick with JWM or Fluxbox.

Appreciate your help though.

Bones
Dell Latitude D630 running Puppy 5.2.8 frugal, Macpup 525 frugal (if I can get it working again. Sadly, I couldn't get it fixed :? )
Precise Puppy 5.4 live DVD
Precise 5.7.3 on USB

User avatar
miriam
Posts: 373
Joined: Wed 06 Dec 2006, 23:46
Location: Queensland, Australia
Contact:

#10 Post by miriam »

Here is some very interesting information from the gqmpeg README file:
======== Extended keyboard keys (internet keys)

Many modern keyboards, often refered to as internet keyboards, include
extra keys that can be assigned to various functions. Audio controls
are often included on these keyboards, but X does not support these
extra keys by default. This is a brief summary of what is needed to
make these audio keys work in GQmpeg.

At this time, only XFree86 is supported.

Run the 'xev' command, press the spacebar, you will see output like this:

KeyPress event, serial 27, synthetic NO, window 0x2400001,
root 0x3a, subw 0x0, time 301742283, (124,120), root:(134,178),
state 0x0, keycode 65 (keysym 0x20, space), same_screen YES,
XLookupString gives 1 characters: " "

The important thing here is the keycode and keysym codes reported. Now
try one of your internet keys, you will see a keycode for the key, but
the keysym will be 0 (if it assigned already, you may be already set),
X has not mapped this key to anything useful. Note that for any keys
that send a keycode value of 0, then something else will be needed (like
jumping through hoops) which is outside the scope of this document.

The keysyms that are understood for the common internet keys are stored
in a file called XKeysymDB, usually located here (use slocate to find it):

/usr/X11R6/lib/X11/XKeysymDB

It may be handy to have this file open for reference during the next step.

Now, in another terminal, open the ~/.Xmodmap file for editing with your
favorite editor (if it does not exist, this is fine, simply create it as
an empty file). In this file, for each key you wish to assign a mapping
add a line like this:

keycode ### = XF86KEYDESCRIPTION

the ### will be the keycode number reported for the key with xev, and
the XF86KEYDESCRIPTION should be a XF86XXXXXXX keysym listed in the
XKeysymDB file. An example line for a play button:

keycode 162 = XF86AudioPlay

This assignes the keycode 162 (The play button on my keyboard), to send
the XF86AudioPlay code to X applications. (If you wish to add comments
to the file for future reference, use ! to mark a line as a comment).

At this point, you should have three things open:
the xev program (from a terminal) to display the keycodes of your keys
the XKeysymDB file for reference of available keysyms
the ~/.Xmodmap file you are editing

For each key, move the focus to the xev window, press it. If a keysym is
not assigned, note the keycode, find a suitable keysym from the XKeysymDB
reference file, and add a line to the ~/.Xmodmap file.

When done adding lines in ~/.Xmodmap for each of your internet keys, save
the file. Now run the command:

xmodmap ~/.Xmodmap

Now go back to the xev program and test to see if your keys are now sending
the keysyms you assigned. If they are, congratulations! you are set.

When X is started, ~/.Xmodmap is usually read automatically, if not, you may
need to add the xmodmap command above to your xinitrc or .Xclients file.

GQmpeg supports the following keysyms:

KeySym Function

XF86AudioLowerVolume Volume Control
XF86AudioRaiseVolume Volume Control
XF86AudioMute Run external mixer
XF86AudioPlay Play
XF86AudioPause Pause
XF86AudioStop Stop
XF86AudioPrev Previous song
XF86AudioNext Next song
XF86AudioMedia Open playlist window
XF86Eject Open Playlist window
XF86OpenURL Display file open dialog

GQmpeg must have the focus for these keys to work, if you want these to
be global shortcuts to gqmpeg (regardless of application focus) they will
need to be set up as shortcuts to gqmpeg command line controls (see
gqmpeg --help) in either your window manager, or a suitable utility.
I have used the xev program to find out the the effect of various keys, but I haven't used the XF86 keysyms yet. I'm just quoting this here because it might prove useful for others.
[color=blue]A life! Cool! Where can I download one of those from?[/color]

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#11 Post by darkcity »

thanks for the info.

do you know anything about install fonts for different countries? Kocg needs help-
http://www.murga-linux.com/puppy/viewtopic.php?t=77253

Post Reply