Subject: Re: console scrolling
To: Christian Biere <christianbiere@gmx.de>
From: David Brownlee <abs@NetBSD.org>
List: tech-net
Date: 01/30/2007 11:38:53
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--7ZAtKRhVyVSsbBD2
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; format=flowed
Content-ID: <Pine.NEB.4.64.0701301137092.807@localhost.>
Content-Disposition: INLINE

On Mon, 29 Jan 2007, Christian Biere wrote:

> Joerg Sonnenberger wrote:
>> On Mon, Jan 29, 2007 at 09:46:22PM +0100, Christian Biere wrote:
>>> Joerg Sonnenberger wrote:
>>>> *Left*-Shift + Page Up/Down
>>>
>>> Is this a bug or a feature?
>>
>> A documented misfeature? It is written in wsdisplay(4) that way.
>
> Well, it's obviously an artifact of the way the modifier is handled by
> the scroll support code. The attached changes this to just look whether
> any shift modifier is set. Of course if you wanted Control+Shift as
> modifier, Control *or* Shift would be sufficient with this code. I
> could imagine though that this is the preferred hack.

 	Not having it check both shifts allows a shift+page up/down to
 	be sent through to an app running on the console. Personally
 	I think the utility of that is less than that of right shift
 	page up/down also scrolling the console :)

-- 
 		David/absolute       -- www.NetBSD.org: No hype required --
--7ZAtKRhVyVSsbBD2
Content-Type: TEXT/PLAIN; CHARSET=us-ascii
Content-ID: <Pine.NEB.4.64.0701301137093.807@localhost.>
Content-Description: 
Content-Disposition: ATTACHMENT; FILENAME=wskbd.c.udif

Index: wskbd.c

===================================================================

RCS file: /cvsroot/src/sys/dev/wscons/wskbd.c,v

retrieving revision 1.99

diff -u -p -r1.99 wskbd.c

--- wskbd.c	4 Jan 2007 18:44:46 -0000	1.99

+++ wskbd.c	29 Jan 2007 21:59:52 -0000

@@ -292,7 +292,7 @@ struct wskbd_scroll_data wskbd_default_s

 #ifdef WSDISPLAY_SCROLLCOMBO

  	WSDISPLAY_SCROLLCOMBO,

 #else

- 	MOD_SHIFT_L,

+ 	MOD_ANYSHIFT,

 #endif

 };

 #endif

@@ -1447,7 +1447,7 @@ internal_command(struct wskbd_softc *sc,

 			if ((sc->sc_scroll_data.mode == WSKBD_SCROLL_MODE_HOLD

 			   	&& MOD_ONESET(sc->id, MOD_HOLDSCREEN))

 			|| (sc->sc_scroll_data.mode == WSKBD_SCROLL_MODE_NORMAL

-				&& sc->sc_scroll_data.modifier == state)) {

+				&& sc->sc_scroll_data.modifier & state)) {

 					update_modifier(sc->id, *type, 0, MOD_COMMAND);

 					wsdisplay_scroll(sc->sc_base.me_dispdv,

 						(ksym == KS_Cmd_ScrollFastUp) ?

@@ -1466,7 +1466,7 @@ internal_command(struct wskbd_softc *sc,

 			if ((sc->sc_scroll_data.mode == WSKBD_SCROLL_MODE_HOLD

 			   	&& MOD_ONESET(sc->id, MOD_HOLDSCREEN))

 			|| (sc->sc_scroll_data.mode == WSKBD_SCROLL_MODE_NORMAL

-				&& sc->sc_scroll_data.modifier == state)) {

+				&& sc->sc_scroll_data.modifier & state)) {

 					update_modifier(sc->id, *type, 0, MOD_COMMAND);

 					wsdisplay_scroll(sc->sc_base.me_dispdv,

 					   	(ksym == KS_Cmd_ScrollSlowUp) ?


--7ZAtKRhVyVSsbBD2--