After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 97725 - dynamic mapping of windows to keys
dynamic mapping of windows to keys
Status: RESOLVED OBSOLETE
Product: metacity
Classification: Other
Component: general
unspecified
Other All
: Low enhancement
: future
Assigned To: Metacity maintainers list
Metacity maintainers list
: 170549 (view as bug list)
Depends on:
Blocks: 155456
 
 
Reported: 2002-11-05 13:01 UTC by Stephane Chauveau
Modified: 2020-11-07 12:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bookmarking script (5.73 KB, text/plain)
2009-03-07 21:23 UTC, Thomas Thurman
Details

Description Stephane Chauveau 2002-11-05 13:01:43 UTC

Comment 1 Stephane Chauveau 2002-11-05 13:07:02 UTC
This is a enhancement request to implement a simple method to 
dynamically map a window to a key shortcut.

Metacity proposes several ways to cycle through the windows
but none of them is really efficient if you have several 
opened windows. In my own case, I noticed that I have often 
more than 10 windows opened but I hardly use more than 2 or
3 at the same time. 

I propose to implement a method to dynamically associate 
a window to a keystroke. 

I see 2 possible implementations:

(1) create a large number of shortcuts. <n> represents a number.

  - 'map_<n>'  is a window shortcut to map the window to 
    the number <n>

  - 'select_<n>' is a global shortcut to select the window
    previously mapped to number <n>


(2) create only 2 shortcuts.

  - 'map_window' is a window shortcut. 
    It opens a dialog asking for a key (or an ascii character) to 
    which the window will be mapped.
    
  - 'select_mapped_window' is a global keystroke
    It opens a dialog with a list of all mapped windows with their
    respective key defined in 'map_window'. The user then have to
    press the proper key to select a window. 

  Example with 'map_window' is <Shift><Alt>Space and 
          'select_mapped_window' is <Alt>Space

   (a) Map a window to 'x' 
 
    - give the focus to the window you want to map (e.g. an xterm)
    - press <Shift><Alt>Space. A dialog asking for a key should  
      appear. 
    - press the key 'x' 

   (b) Select the window previously mapped to 'x' 
   
    - press <Alt>Space
    - press 'x'

My preference goes to the second solution. It is probably 
more difficult to implement but it is also more flexible
and requires less shortcuts.

In both implementations, the key mapped to a window could
be displayed in its title. 

Comment 2 Havoc Pennington 2002-11-20 05:27:30 UTC
What if you pressed Alt+Tab and a number appeared by/over each window
(or by each window's icon in the tab popup, or both) 
and you could then press that number to jump straight to 
the window. So there would only be three keypresses:

 Alt Tab N

If people have to make up their own bindings and then remember them
I doubt most would bother.

It's a feature that could use some test patches to experiment with and 
see if it works in practice.
Comment 3 Stephane Chauveau 2002-11-20 07:46:25 UTC
That could work if the shortcut in Alt+Tab is statically 
allocated. If it is not, having a 'moving' shortcut does 
not really help if you have a lot of windows. The main 
purpose of my request is to not have to identify the  
window.

Numbers 0-9 are not enough. A-Z could also be used. 

Alt+Tab could also provide a method to set/swap shortcuts. 
For example with Ctrl+N. 

btw, I got this idea of dynamic shortcut from ratpoison; 
a simple WM withou windows. All windows are fullscreen 
and all actions are performed via keyboard shortcuts. 



Comment 4 Havoc Pennington 2003-02-25 21:13:18 UTC
The shortcut assignment could perhaps be based on window position, 
which would mean that if you usually log in and use the same 
arrangement of windows you'd always get consistent shortcuts. 
(Better than basing them on say order in which windows were launched)
Comment 5 Rob Adams 2003-03-03 06:31:24 UTC
marking low for now
Comment 6 Elijah Newren 2005-03-16 22:59:25 UTC
*** Bug 170549 has been marked as a duplicate of this bug. ***
Comment 7 Thomas Thurman 2009-03-07 21:23:55 UTC
Created attachment 130251 [details]
Bookmarking script

Here's a simple Perl script as a first try towards this behaviour.
Comment 8 André Klapper 2020-11-07 12:36:38 UTC
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all
old feature requests in Bugzilla which have not seen updates for many years.

If you still use metacity and if you are still requesting this feature in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/metacity/-/issues/

Thank you for reporting this issue and we are sorry it could not be implemented.