This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: standard event bindings


>If you type 'Delete key', it sets %A to '{}' and is interpreted as 'zoom out'.
>This patch seems to work, but Does it go to excess?

Unfortunately, it disables the Return key on the Mac, which is kind of a
fatal problem (impossible to give keyboard commands). The whole purpose of
this rather hairy piece of code is to enable the Return key, which
surprisingly enough, does not have a Tcl keycode on the Mac. I tried a
simpler solution first, but somebody (I think it was you) pointed out that
the Shift key didn't work on Unix then. The present code is the only
solution that works on all platforms.

Looking at it, it seems that a lot of keys cause zooming, not just Delete
and BackSpace. The following patch fixes all problems on the Mac. Maybe you
can find more Unix-specific keys that should be added to the list?

	    { if {"%K" != "{}" && "%K" != "Shift_L" && "%K" != "Shift_R" \
	    	&& "%K" != "Meta_L" && "%K" != "Meta_R" \
	    	&& "%K" != "Alt_L" && "%K" != "Alt_R" \
+	    	&& "%K" != "Delete" && "%K" != "BackSpace" \
+	    	&& "%K" != "Left" && "%K" != "Right" \
+	    	&& "%K" != "Up" && "%K" != "Down" \
+	    	&& "%K" != "Home" && "%K" != "End" \
+	    	&& "%K" != "Prior" && "%K" != "Next" \
+	    	&& "%K" != "Escape" && "%K" != "Help" \
+	    	&& "%K" != "Tab" && "%K" != "Clear" \
+	    	&& "%K" != "F1" && "%K" != "F2" \
+	    	&& "%K" != "F3" && "%K" != "F4" \
+	    	&& "%K" != "F5" && "%K" != "F6" \
+	    	&& "%K" != "F7" && "%K" != "F8" \
+	    	&& "%K" != "F9" && "%K" != "F10" \
+	    	&& "%K" != "L1" && "%K" != "L2" \
+	    	&& "%K" != "L3" && "%K" != "L4" \
+	    	&& "%K" != "L5" \
	    	&& "%K" != "Control_L" && "%K" != "Control_R" } \
	    		{ handle_key_binding "%A" "%K" %W %X %Y } }

I think the underlying problem is that the { and } keys, which have special
meanings in Tcl, are used to zoom in and out. This is by the way rather
inconvenient on the Mac, since you can access them only by a Shift-Alt
command. I therefore mapped KP + and KP - to zoom in and out in the mac
(non-Tcl) interface a long time ago. Maybe we should do this as a rule on
all platforms and get rid of the curly braces altogether?

Hans

Hans Ronne

hronne@pp.sbbs.se



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]