How to zoom xrandr with Xkb? - Xwindows

This is a discussion on How to zoom xrandr with Xkb? - Xwindows ; Hi, I could of course set up a window-manager keybinding to start xrandr 0, 1, ... But it seems a stupid thing to do, to pass a key event to the WM, have it fork / exec an external program ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How to zoom xrandr with Xkb?

  1. How to zoom xrandr with Xkb?

    Hi,

    I could of course set up a window-manager keybinding to start xrandr 0, 1, ...
    But it seems a stupid thing to do, to pass a key event to the WM, have it fork
    /
    exec an external program which in turn connects to X, to tell it what to do.

    I was instead thinking of something like this, which I have in my Xkb setup:

    key {
    type= "HYPER+ALT",
    symbols[Group1]= [ KP_Subtract, XF86_Prev_VMode ]
    };
    key {
    type= "HYPER+ALT",
    symbols[Group1]= [ plusminus, XF86_Next_VMode ]
    };

    The drawback of these is that the virtual resolution doesn't change so the
    screen slides around, which is sometimes not what I want.

    I tried XF86ZoomOut and XF86ZoomIn instead, but they seem to be NOPs. Any
    help would be greatly appreciated! Please copy me in personally.

    coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
    Daniel Pfeiffer

    --
    lerne / learn / apprends / lär dig / ucz się Esperanto:
    http://lernu.net/

  2. Re: How to zoom xrandr with Xkb?

    Daniel Pfeiffer wrote:
    >Hi,
    >
    >I could of course set up a window-manager keybinding to start xrandr 0, 1, ...
    >But it seems a stupid thing to do, to pass a key event to the WM, have it fork
    >/
    >exec an external program which in turn connects to X, to tell it what to do.
    >
    >I was instead thinking of something like this, which I have in my Xkb setup:
    >
    > key {
    > type= "HYPER+ALT",
    > symbols[Group1]= [ KP_Subtract, XF86_Prev_VMode ]
    > };
    > key {
    > type= "HYPER+ALT",
    > symbols[Group1]= [ plusminus, XF86_Next_VMode ]
    > };
    >
    >The drawback of these is that the virtual resolution doesn't change so the
    >screen slides around, which is sometimes not what I want.
    >
    >I tried XF86ZoomOut and XF86ZoomIn instead, but they seem to be NOPs. Any
    >help would be greatly appreciated! Please copy me in personally.


    Well, what you suggest is reasonable -- the xkb extension supports the
    idea of binding an action to a key, and one type of action is sending
    an "action message" to all clients that have requested such messages.
    The X server itself is a "recipient" in the sense that it interprets
    several of these.

    What appears to be lacking (based on a glance at the 4.3 tree) is the
    specific handling of an R&R action message, but all the infrastructure
    for doing such a thing seems to be in place.

    If you find such a feature compelling enough to write a patch, it should
    be an easy one.


+ Reply to Thread