Linux Windows Start Key in Linux

Discussion in 'Software' started by OneSeventeen, 4 Feb 2006.

  1. OneSeventeen

    OneSeventeen Oooh Shiny!

    Joined:
    3 Apr 2002
    Posts:
    3,454
    Likes Received:
    2
    I've recently begun using the Ubuntu key on my PC at work (that's the key with the waving flag on it, btw), and I must say I missed it while it was gone, but I'm glad to have it back!!

    All I had to do in Ubuntu 5.10 was go to Applications>System>Configuration Editor

    Then I browsed for Apps>Metacity

    Inside that folder, I could add commands in one section, and they key they are bound to in another.

    Unfortunately that was at work, and I'm on a windows machine now (silly vinyl cutter has no linux drivers :( ), but here's a rough sketch:

    inside the mysterious command folder:
    find command_1 (or whatever it's called) change the value from blank to "xscreensaver-command -lock"
    Now inside the mysterious key binding folder:
    find command_1 and change teh value from blank to "<Mod4>l" (lowercase L)

    Now when I hit Ubuntu+L it locks my screen.

    You can then add as many as you like, such as <Mod4>e mapped to "nautilus"

    I've even heard you can map mouse scroll wheel events to keys, and therefore use those key bindings for things such as volume control!

    So something like <control><whatever mouse wheel up is> bound to "amixer sset PCM 1+ unmute" (thinking off the top of my head without a linux box nearby, I'll post tomorrow with more accurate details)

    Anyway, I thought it was cool, and definitely worth looking into, especially those who wish to get windows users switched to linux.
     
  2. AJB2K3

    AJB2K3 What's a Dremel?

    Joined:
    12 Dec 2005
    Posts:
    1,605
    Likes Received:
    4
    HUH?
    I dont quite understand.
    When looking at the XKB files it appears bound a menukey.
     
  3. OneSeventeen

    OneSeventeen Oooh Shiny!

    Joined:
    3 Apr 2002
    Posts:
    3,454
    Likes Received:
    2
    In the default Ubuntu setup, I guess it isn't already bound to anything, other than the fact it comes across as "Super_L" for the left one, "Super_R" for the right one, and "Mod4" for either one.

    So if I go to Applications>System Tools>Configuration editor then navigate in there to apps>metacity>keybinding_commands
    I can change the value of the next available command to.. well... a command.

    Let's assume I have command_1 free, so I click in the Value portion, type in "xscreensaver-command -lock" and hit enter.
    now I go to the /apps/metacity/global_keybindings branch of the configuration editor, and find the key "run_command_1" and click in the Value field. I type in "<Mod4>l" and hit enter.

    Now every time I hit the windows key + L it locks the workstation.

    I've heard some distros/WMs default the start key to the application menu or something similar. That will then prevent you from using it as a keybinding command, because everytime you hit the key it pops open a window or something, and metacity stops listening for more keystrokes. (kind of like if you map control to do something, you loose tons of functionality of the control key)

    does that help clarify at all?

    To see if it registers as a key, you can always type in "xev" in the command line and start hitting keys.
     
  4. AJB2K3

    AJB2K3 What's a Dremel?

    Joined:
    12 Dec 2005
    Posts:
    1,605
    Likes Received:
    4
    Ohhh yes alot. that now give me a clue to sorting out my keys on my mandriva setup.
     
Tags:

Share This Page