Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 May 2002 16:21:38 -0600 (MDT)
From:      "Aaron D.Gifford" <agifford@infowest.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/37942: [PATCH] Add a new FreeBSD compatible KDE konsole keyboard table  to KDE 3.0's konsole to fix annoying incompatibilities
Message-ID:  <20020510222138.4759922A9A@ns1.infowest.com>

next in thread | raw e-mail | index | archive | help

>Number:         37942
>Category:       ports
>Synopsis:       KDE 3.0 konsole terminal keyboard table update for better FreeBSD compatibility
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 10 15:30:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Aaron D. Gifford
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
N/A
>Environment:
System: FreeBSD host.example.com 4.5-STABLE FreeBSD 4.5-STABLE #12: Tue Apr 16 12:38:14 MDT 2002 root@host.example.com:/usr/obj/usr/src/sys/MYKERNCONF i386
>Description:
	This is a feature request with a provided patch to add the feature easily.

	By default, KDE's konsole application is not quite compatible with the FreeBSD
	"xterm" terminal emulation, causing minor annoyances using applications like
	vi, or even doing command line editing with bash.  The fix is very simple.
>How-To-Repeat:
	Open a KDE konsole and try to use your "Home" or "End" keys using bash to
	jump to the start or end of the command line, or try using the Page Up or
	Page Down keys within more or vi.  Also, FreeBSD's default console and
	xterm uses CTRL-H for the Backspace key, but KDE's konsole does not.
>Fix:

	Change your working directory to /usr/local/share/apps/konsole, then
	copy the default.Keytab to freebsd.keytab and apply the patch below.

	# cd /usr/local/share/apps/konsole
	# cp default.Keytab freebsd.keytab
	# patch -p < /path/to/keytab/patch/below

	Next, start your konsole application and from the Keyboard submenu of
	the Settings menu, choose the new "FreeBSD XTerm (XFree 4.x.x)" option.
	Then do "Save Settings" from the Settings menu.

	Now you can use KDE's konsole without all the annoying little irritations.

	Would it be possible to get something like this (say a FreeBSD specific
	keyboard table) included with the KDE 3.0 port?

	Thanks!
	
	Aaron out.

HERE'S THE PATCH:
-----------------

--- freebsd.keytab.orig	Sun Apr 14 00:15:38 2002
+++ freebsd.keytab	Fri May 10 15:57:53 2002
@@ -1,22 +1,14 @@
-# [default.Keytab] Buildin Keyboard Table
-
-# --------------------------------------------------------------
-#
-# This file is used to create the buildin keyboard table.
-# It is included for reference purpose with the *.keytab
-# files that are loaded dynamically.
+# [freebsd.keytab] FreeBSD XFree 4.x.x Keyboard Table
 #
-# Modifying it does not have any effect (unless you
-# derive the default.keytab.h and recompile konsole).
-#
-# To customize your keyboard, copy this file to something
-# ending with .keytab and change it to meet you needs.
-# Please read the README.KeyTab and the README.keyboard
-# in this case.
+# Based on the default KDE XFree 4.x.x keyboard table with mods
+# to better match FreeBSD's xterm termcap information and
+# settings.  Only a very few things actually change: backspace,
+# delete, the four cursor keys, page up/prev/prior, page down/
+# next, home and end keys.
 #
 # --------------------------------------------------------------
 
-keyboard "XTerm (XFree 4.x.x)"
+keyboard "FreeBSD XTerm (XFree 4.x.x)"
 
 # --------------------------------------------------------------
 #
@@ -39,16 +31,16 @@
 
 key Return+Shift         : "\EOM"
 
-# Backspace and Delete codes are preserving CTRL-H.
-
-key Backspace      : "\x7f"
+# FreeBSD xterm uses \x08 (CTRL-H or ^H) for Backspace:
+key Backspace      : "\x08"
 
 # Arrow keys in VT52 mode
 
-key Up   -Shift-Ansi : "\EA"
-key Down -Shift-Ansi : "\EB"
-key Right-Shift-Ansi : "\EC"
-key Left -Shift-Ansi : "\ED"
+# FreeBSD xterm cursor keys:
+key Up   -Shift-Ansi : "\EOA"
+key Down -Shift-Ansi : "\EOB"
+key Right-Shift-Ansi : "\EOC"
+key Left -Shift-Ansi : "\EOD"
 
 # Arrow keys in ANSI mode with Application - and Normal Cursor Mode)
 
@@ -67,8 +59,9 @@
 key Enter+NewLine : "\r\n"
 key Enter-NewLine : "\r"
 
-key Home  -Shift-AppCuKeys : "\E[H"  
-key End   -Shift-AppCuKeys : "\E[F"  
+# FreeBSD Home and End xterm keys:
+key Home  -Shift-AppCuKeys : "\EOH"  
+key End   -Shift-AppCuKeys : "\EOF"  
 key Home  +Shift-AppCuKeys : "\E[2H"  
 key End   +Shift-AppCuKeys : "\E[2F"  
 
@@ -78,8 +71,9 @@
 key End   +Shift+AppCuKeys : "\EO2F"  
 
 key Insert-Shift : "\E[2~"  
-key Delete-Shift : "\E[3~"  
-key Prior -Shift : "\E[5~"  
+# FreeBSD uses \x7f for Delete:
+key Delete-Shift : "\x7f"
+key Prior -Shift : "\E[5~"
 key Next  -Shift : "\E[6~"  
 
 key Delete+Shift : "\E[3;2~"  

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020510222138.4759922A9A>