Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: fvwm2 keybinding to close window

  1. #1
    Associate
    Join Date
    Sep 2003
    Posts
    30

    fvwm2 keybinding to close window

    Hi,

    Have succesfully configured fvwm2 with its rc file, alt-tab swithching etc. but unable to work out how to shut down a program and close its window from the keyboard. Anyone know how its done?

    Also how is a newly started program automatically given the focus - or mouse jumps automatically to its window, which would amount to the same thing?

    (Incidentally it only uses fractionally more memory than twm, remarkable.)

    Thanks for any help.

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Posts
    421

    Re:fvwm2 keybinding to close window

    Yay welcome to the fvwm club. I think that makes it three of us.

    To close a window you could use somthing like this:

    AddToFunc close_window
    + I ThisWindow ($0) Close

    Key F11 W SCM close_window

    This would close the current focused window when you hit ALT-CTRL-SHIFT-F11.

    To have new windows automatically grab the focus use

    Style * GrabFocus

  3. #3

    Re:fvwm2 keybinding to close window

    yea!!

  4. #4
    Associate
    Join Date
    Sep 2003
    Posts
    30

    Re:fvwm2 keybinding to close window

    Thanks greatly.

    Fly in ointment: alt-tab swithching and click anywhere on window to get focus and ctrl-arrow and alt-arrow to move about virtual desktop work when fvwm2 is started but stop working later. The application seems to get the commands they are not intercepted by the window manager, seems like.

    Any remedy for this? :-\

  5. #5
    Senior Member
    Join Date
    Sep 2002
    Posts
    421

    Re:fvwm2 keybinding to close window

    [me=demian]hmmms[/me]

    Could it be that the key bindings stop working once you start a certain application? Maybe the app intercepts them because they are asinged to specific actions there.

    Also does this happen in any context your mouse cursor is (root window, window,...)? What focus policy do you use? Post the relevant part from the config file.

  6. #6
    Associate
    Join Date
    Sep 2003
    Posts
    30

    Re:fvwm2 keybinding to close window

    Stumbled on answer to keybindings not working: they don't when numlock is on. Have heard of this somewhere, ?Enlightenment.

    So almost everything working. If no trouble all need now is keys to close focused window, couldn't get below to work - its maybe what should 'ThisWindow' be? And what keys to click on something when the pointer has been moved over it with the keyboard?


    AddToFunc close_window
    + I ThisWindow ($0) Close

    Key F11 W SCM close_window (jumps to an empty terminal, but presumably just change F11)


    Thanks.


  7. #7
    Senior Member
    Join Date
    Sep 2002
    Posts
    421

    Re:fvwm2 keybinding to close window

    Yeah, the numlock thing makes sense. Didn't think of that. Numlock is treated as a modifier key so unless there's an "A" in your keybinding definition (all modifiers) it makes a difference whether or not numlock is on.

    If you don't need numlock as a modifier use

    IgnoreModifiers L2

    is your rc file. Put this line somewhere close to the top of the rc file _before_ any modules are started.

    As for the Close thingy not working: Where is your mouse cursor when you press the keys? The "W" tells fvwm this binding is to be used in the window context only. This means the mouse is inside an application window (not the title bar, not the edges, not the root window...). You can make it work in any context when you A instead of W.

    Here's the part of the man page to fvwm that describes all the contexts:

    Valid contexts are 'R' for the root window, 'W' for an application window, 'D' for a desktop application (as kdesktop or Nautilus desktop), 'T' for a window title-bar, 'S' for a window side, top, or bottom bar, '[', ']', '-' and '_' for the left, right, top or bottom side only, 'F' for a window frame (the corners), '<', '^', '>' and 'v' for the top left, top right, bottom right or bottom left corner, 'I' for an Icon window, or '0' through '9' for title-bar buttons, or any combination of these letters. 'A' is for any context. For instance, a context of "FST" applies when the mouse is anywhere in a window's border except the title-bar buttons. Only 'S' and 'W' are valid for an undecorated window.
    And what keys to click on something when the pointer has been moved over it with the keyboard?
    You mean you want to emulate a mouse click with the keyboard? See FAQ 3.5

  8. #8
    Associate
    Join Date
    Sep 2003
    Posts
    30

    Re:fvwm2 keybinding to close window

    Thanks.

    AddToFunc close_window
    + "I" WindowId $w Close

    Key Q A CM close_window

    closes windows ok.

    Didn't know about faq's, thanks again.

    Now got most efficient desktop I've had.

  9. #9
    Mentor cga's Avatar
    Join Date
    May 2001
    Posts
    1,433

    Re:fvwm2 keybinding to close window

    OK, who knows how to kill that builtin menu on the mouse wheel?

  10. #10

    Re:fvwm2 keybinding to close window

    what ya mean cga? I have my middle mouse bound to strokes and so nothing comes up, before that I had a active window list pop up.

    Code:
    Mouse 1R   A      Menu RootMenu Nop
    Mouse 2R    A      
    Mouse 3R    A      Menu Window-Ops Nop

Similar Threads

  1. Do not allow user to close program
    By countach44 in forum Windows - General Topics
    Replies: 1
    Last Post: 04-12-2005, 05:49 PM
  2. Fvwm2 window list Q
    By cga in forum Linux - Software, Applications & Programming
    Replies: 5
    Last Post: 11-06-2003, 02:32 AM
  3. FVWM2 and Libstroke.so.0
    By Rastar in forum Linux - Software, Applications & Programming
    Replies: 5
    Last Post: 05-16-2003, 10:04 PM
  4. playing with fvwm2
    By cga in forum Linux - Software, Applications & Programming
    Replies: 6
    Last Post: 05-07-2003, 11:51 PM
  5. How to close down ports with IPCHAINS
    By Compunuts in forum Linux - Software, Applications & Programming
    Replies: 14
    Last Post: 01-22-2002, 10:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •