Subject: Re: Re: Re: X keymapping
To: Rui Paulo <rpaulo@NetBSD.org>
From: Joel CARNAT <joel@carnat.net>
List: netbsd-users
Date: 09/13/2005 00:14:06
--ibTvN161/egqYuK8
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Sep 12 2005 - 22:32, Rui Paulo wrote:
> On 2005.09.12 23:30:13 +0200, Joel CARNAT wrote:
> | On Mon, Sep 12 2005 - 22:14, Rui Paulo wrote:
> | > On 2005.09.12 23:04:12 +0200, Joel CARNAT wrote:
> | > | Hi,
> | > |=20
> | > | So, (how) can I (re)map Shift+DEL to paste rather than Shift+INS ?
> | > |=20
> | >=20
> | > I believe that you can use xmodmap(1). Something like:
> | > keycode 106 =3D Delete
> | > keycode 107 =3D Insert
> | > will switch the Delete and Insert keys.
> | >=20
> |=20
> | well, I thought about this, but then, I will not have any 'DEL' key at
> | all (in firefox, ...).
> |=20
> | the thing I didn't found was : how to remap only when used with Shift ;
> | keeping standard mapping.
>=20
> Probably:
> keycode 107 =3D Delete Insert
>=20
> The second keysym is captured with the shift modifier.
>=20
thanks ; nearly there :)
I did that and it works in gvim... but not in XTerm nor in Firefox :(
Here's what I did :
# cat ~/.xmodmaprc=20
! Logitech UltraX
!
! DEL is DEL, Shift-DEL is Shift-INS (aka, paste)
!
keycode 107 =3D Delete Insert
!keysym Delete =3D Delete Insert
# xmodmap ~/.xmodmaprc
I disabled .Xdefaults, in case there was something xterm won't like but
it's not the clue :(
"shift-del" in XTerm generate ';2~'.
in xev, it says :
************************************
KeyPress event, serial 34, synthetic NO, window 0x1a00001,
root 0x60, subw 0x0, time 339629, (75,-163), root:(79,627),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:=20
XmbLookupString gives 0 bytes:=20
XFilterEvent returns: False
KeyPress event, serial 34, synthetic NO, window 0x1a00001,
root 0x60, subw 0x0, time 340141, (75,-163), root:(79,627),
state 0x1, keycode 107 (keysym 0xff63, Insert), same_screen YES,
XKeysymToKeycode returns keycode: 106
XLookupString gives 0 bytes:=20
XmbLookupString gives 0 bytes:=20
XFilterEvent returns: False
KeyRelease event, serial 34, synthetic NO, window 0x1a00001,
root 0x60, subw 0x0, time 340221, (75,-163), root:(79,627),
state 0x1, keycode 107 (keysym 0xff63, Insert), same_screen YES,
XKeysymToKeycode returns keycode: 106
XLookupString gives 0 bytes:=20
KeyRelease event, serial 34, synthetic NO, window 0x1a00001,
root 0x60, subw 0x0, time 340621, (75,-163), root:(79,627),
state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:=20
************************************
which says the mapping is OK, isn't it ?
what is *** really *** weird/annoying is that "keycode 107 =3D Delete C"
writes a 'C' in xterm when I shift+del... looks like this keyboard just
want's to fool me ;(
finally, 'keysym End =3D End Insert' give ';2~' (on shift-end) but "keysym
C =3D c Insert" pastes (on shift-c)... grrr :)
the last though is my "XkbModel"... it's set to "logicdp". I'll try
pc105 when this email will be sent.
any (other) idea ?
TIA,
Jo
--ibTvN161/egqYuK8
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (NetBSD)
iD8DBQFDJf2u0/VH7L7F7Y4RAtfYAJ4zM4vBzNTsFqt/2htG1167VdSpiACfQxJg
+L4XidMDk4z595W3YFSiSzM=
=A54u
-----END PGP SIGNATURE-----
--ibTvN161/egqYuK8--