From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,e3a91992001c83b8 X-Google-Attributes: gid111c93,public From: Tony Hammitt Subject: Re: Konsole Date: 2000/05/30 Message-ID: <3933F2DF.41B751B6@kc.rr.com>#1/1 X-Deja-AN: 629078822 Content-Transfer-Encoding: 7bit References: <3933C1DB.1C5C3B24@ulg.ac.be> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@rr.com X-Trace: typhoon.kc.rr.com 959705824 24.94.177.44 (Tue, 30 May 2000 11:57:04 CDT) MIME-Version: 1.0 Reply-To: thammitt@kc.rr.com NNTP-Posting-Date: Tue, 30 May 2000 11:57:04 CDT Newsgroups: comp.os.linux.alpha Olivier Adam wrote: > > Hi, > > I'm using RedHat 6.1 installed on a Compaq DS10. > My system runs approximately fine, but i'm a KDE user > and it seems to have some stability problems... > > However, i'd like to know how to deal with 'delete' > and 'backspace' keys. Especially in Konsole, which i > use as terminal emulator. Both keys produce a '~' instead > of suppressing the characters... sorry if it is a dumb question > but how can i work this around ? > > A similar problem exists in Kedit, for example :(( > > Thanks, > > Olivier Well, if they won't work in anything, it makes me wonder what keycode they are sending. X works by interpreting the key you type into a symbol code, then the programs work based on that symbol code instead of the raw key code. This helps porting and internationalization. Try the following: launch the program 'xev', the X event displayer move the pointer into the window, this will cause lots of events to be displayed in the terminal. press the backspace key, if you see something like the following, it is properly defined: KeyPress event, serial 18, synthetic NO, window 0x3400001, root 0x26, subw 0x0, time 1927467055, (110,98), root:(258,301), state 0x0, keycode 22 (keysym 0xff08, BackSpace), same_screen YES, XLookupString gives 1 characters: " KeyRelease event, serial 21, synthetic NO, window 0x3400001, root 0x26, subw 0x0, time 1927467191, (110,98), root:(258,301), state 0x0, keycode 22 (keysym 0xff08, BackSpace), same_screen YES, XLookupString gives 1 characters: " this is what I got for pressing delete: KeyPress event, serial 21, synthetic NO, window 0x3400001, root 0x26, subw 0x0, time 1927532996, (85,43), root:(660,224), state 0x0, keycode 107 (keysym 0xffff, Delete), same_screen YES, XLookupString gives 1 characters: "" KeyRelease event, serial 21, synthetic NO, window 0x3400001, root 0x26, subw 0x0, time 1927533101, (85,43), root:(660,224), state 0x0, keycode 107 (keysym 0xffff, Delete), same_screen YES, XLookupString gives 1 characters: "" If you got different keysym codes, you'll need to change them. This is done with the xmodmap command, which has to be run everytime you startx. If your keycode is 22 and you want to send backspace, try: xmodmap -e 'keycode 22 = 0xFF08' If you want to redefine some other keys, the codes are in: /usr/X11R6/include/X11/keysymdef.h just get the keycode from xev and have it send a keysym from the file. Hope this helps, Tony Hammitt P.S. This is also useful to do something with those silly windoze keys, like if you wanted to remap them to F13-F15. On my keyboard, this takes: xmodmap -e 'keycode 115 = 0xFFCA' # F13 xmodmap -e 'keycode 116 = 0xFFCB' # F14 xmodmap -e 'keycode 117 = 0xFFCC' # F15 Then I told nedit that F13 was save.. Jeez, I'm lazy...