Results 1 to 10 of 10

Thread: ESC key to close any active window

  1. #1
    Join Date
    Sep 2007
    Beans
    31

    ESC key to close any active window

    Hi good people,
    I'd like to set my ESC key to close any active window. Is it possible ?

    Thank you

  2. #2
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: ESC key to close any active window

    Yes, it should be possible in System ->Preferences ->Keyboard Shortcuts, Window management, but it may confuse some programs where the Esc key is already set to do something else, so take care.

  3. #3
    Join Date
    Sep 2007
    Beans
    31

    Re: ESC key to close any active window

    Well, you can't really use ESC key, because when you try to set it, it just closes the preferences window
    What I did is to use this command:
    Code:
    wmctrl -c :ACTIVE:
    and associate it with Alt+Z combination.

  4. #4
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: ESC key to close any active window

    Quote Originally Posted by Koala Kid View Post
    Well, you can't really use ESC key, because when you try to set it, it just closes the preferences window
    What I did is to use this command:
    Code:
    wmctrl -c :ACTIVE:
    and associate it with Alt+Z combination.
    Yes, when you think about it, I suppose it would.

    I presume you did get it working OK with no problem, but I'm interested as to why it was needed rather than Alt+F4.

  5. #5
    Join Date
    Sep 2007
    Beans
    31

    Re: ESC key to close any active window

    Oh, I wasn't aware of this. Anyway, alt+z is more comfortable for my fingers

  6. #6
    Join Date
    Sep 2007
    Location
    UK
    Beans
    59
    Distro
    Kubuntu 8.10 Intrepid Ibex

    Re: ESC key to close any active window

    does anyone know if this can be done? i use a mini keyboard (its like using a mobile), so any multi-key function is a hastle. esc is the obvious choice as it is used in programs like xbmc to go back to the parent view.

    cheers

  7. #7
    Join Date
    Sep 2007
    Location
    UK
    Beans
    59
    Distro
    Kubuntu 8.10 Intrepid Ibex

    Re: ESC key to close any active window

    so the missing link is xbindkeys

    install xbindkeys and wmctrl

    run

    Code:
    xbindkeys --defaults > /home/joe/.xbindkeysrc
    to create a default config file
    edit the file, comment out the examples with #, and add the lines

    Code:
    wmctrl -c :ACTIVE:
      Escape
    then save the file and run

    Code:
    xbindkeys
    voila

  8. #8
    Join Date
    Jan 2007
    Location
    Location: Location:
    Beans
    1,246
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: ESC key to close any active window

    You too cool for alt+f4 or something?



    edit: oh forum blindness lol
    clear && echo paste url and press enter; read paste; (youtube-dl $paste) | zenity --progress --title="" --text "Downloading, please wait" --auto-close --pulsate && ans=$(zenity --file-selection); gnome-terminal -x mplayer "$ans"

  9. #9
    Join Date
    Sep 2007
    Location
    UK
    Beans
    59
    Distro
    Kubuntu 8.10 Intrepid Ibex

    Re: ESC key to close any active window

    Actually - yes

  10. #10
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    29,809
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: ESC key to close any active window

    Hi, this is an old thread so it has been closed, thanks for sharing.

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
  •