<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>76976</bug_id>
          
          <creation_ts>2004-03-08 00:45:19 +0000</creation_ts>
          <short_desc>AppScreen support in konsole keytab</short_desc>
          <delta_ts>2004-09-23 21:00:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konsole</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>wishlist</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Don Mahurin">dmahurin</reporter>
          <assigned_to name="Konsole Bugs">konsole-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>213098</commentid>
    <comment_count>0</comment_count>
    <who name="Don Mahurin">dmahurin</who>
    <bug_when>2004-03-08 00:45:20 +0000</bug_when>
    <thetext>Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:          Linux

This patch adds AppScreen support to keytab, so you can have bindings that are different depending on whether you are in a curses editor or not.
Sample use:

key Prior +Shift +AppScreen : &quot;\E[5$&quot;
key Next +Shift +AppScreen: &quot;\E[6$&quot;

key Prior +Shift -AppScreen  : scrollPageUp
key Down  +Shift  -AppScreen : scrollLineDown

Where do I attach the patch?

Index: konsole/konsole/TEmuVt102.cpp
===================================================================
RCS file: /home/kde/kdebase/konsole/konsole/TEmuVt102.cpp,v
retrieving revision 1.107
diff -u -3 -p -r1.107 TEmuVt102.cpp
--- konsole/konsole/TEmuVt102.cpp       3 Nov 2003 08:27:30 -0000       1.107
+++ konsole/konsole/TEmuVt102.cpp       5 Mar 2004 21:41:51 -0000
@@ -895,6 +895,7 @@ void TEmuVt102::onKeyPress( QKeyEvent* e
   if (keytrans-&gt;findEntry(ev-&gt;key(), encodeMode(MODE_NewLine  , BITS_NewLine   ) + // OLD,
                                      encodeMode(MODE_Ansi     , BITS_Ansi      ) + // OBSOLETE,
                                      encodeMode(MODE_AppCuKeys, BITS_AppCuKeys ) + // VT100 stuff
+                                     encodeMode(MODE_AppScreen, BITS_AppScreen ) + // VT100 stuff
                                      encodeStat(ControlButton , BITS_Control   ) +
                                      encodeStat(ShiftButton   , BITS_Shift     ) +
                                      encodeStat(AltButton     , BITS_Alt       ),
Index: konsole/konsole/keytrans.cpp
===================================================================
RCS file: /home/kde/kdebase/konsole/konsole/keytrans.cpp,v
retrieving revision 1.46
diff -u -3 -p -r1.46 keytrans.cpp
--- konsole/konsole/keytrans.cpp        26 Jul 2003 10:41:25 -0000      1.46
+++ konsole/konsole/keytrans.cpp        5 Mar 2004 21:41:51 -0000
@@ -483,6 +483,7 @@ void KeyTransSymbols::defModSyms()
   defModSym(&quot;Ansi&quot;,       BITS_Ansi         );
   defModSym(&quot;NewLine&quot;,    BITS_NewLine      );
   defModSym(&quot;AppCuKeys&quot;,  BITS_AppCuKeys    );
+  defModSym(&quot;AppScreen&quot;,  BITS_AppScreen    );
 }

 void KeyTransSymbols::defKeySyms()
Index: konsole/konsole/keytrans.h
===================================================================
RCS file: /home/kde/kdebase/konsole/konsole/keytrans.h,v
retrieving revision 1.22
diff -u -3 -p -r1.22 keytrans.h
--- konsole/konsole/keytrans.h  16 Feb 2003 23:27:46 -0000      1.22
+++ konsole/konsole/keytrans.h  5 Mar 2004 21:41:51 -0000
@@ -25,6 +25,7 @@
 #define BITS_Shift      5
 #define BITS_Alt        6
 #define BITS_COUNT      7
+#define BITS_AppScreen  8

 #define CMD_none          -1
 #define CMD_send           0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>253331</commentid>
    <comment_count>1</comment_count>
    <who name="Don Mahurin">dmahurin</who>
    <bug_when>2004-07-27 01:28:12 +0000</bug_when>
    <thetext>Please apply this simple yet needed patch.

It allows definitions like Alt or Shift-Arrows to depend on whether in app-screen-mode (vi/other editor) or not.
example1: Shift-Arrow scrolls back in Konsole, but it app mode, it is sent to application (highlight in fte).
example2: Alt-E means Konsole-Edit menu, but in App-Mode it is sent to application (menus). </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>261975</commentid>
    <comment_count>2</comment_count>
    <who name="Don Mahurin">dmahurin</who>
    <bug_when>2004-08-24 19:33:33 +0000</bug_when>
    <thetext>From: Lars Doelle &lt;lars.doelle@on-line.de&gt;

Don, your patch is fine and a good idea, too, i think.
I&apos;d vote to apply the patch.

-lars

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>270916</commentid>
    <comment_count>3</comment_count>
    <who name="Waldo Bastian">bastian</who>
    <bug_when>2004-09-22 22:02:23 +0000</bug_when>
    <thetext>CVS commit by waba: 

Add AppScreen support to keytab (BR76976)
Patch by Don Mahurin
CCMAIL: 76976-done@bugs.kde.org


  M +1 -0      TEmuVt102.cpp   1.112
  M +1 -0      keytrans.cpp   1.48
  M +2 -1      keytrans.h   1.23


--- kdebase/konsole/konsole/TEmuVt102.cpp  #1.111:1.112
@@ -909,4 +909,5 @@ void TEmuVt102::onKeyPress( QKeyEvent* e
                                      encodeMode(MODE_Ansi     , BITS_Ansi      ) + // OBSOLETE,
                                      encodeMode(MODE_AppCuKeys, BITS_AppCuKeys ) + // VT100 stuff
+                                     encodeMode(MODE_AppScreen, BITS_AppScreen ) + // VT100 stuff
                                      encodeStat(ControlButton , BITS_Control   ) +
                                      encodeStat(ShiftButton   , BITS_Shift     ) +

--- kdebase/konsole/konsole/keytrans.cpp  #1.47:1.48
@@ -483,4 +483,5 @@ void KeyTransSymbols::defModSyms()
   defModSym(&quot;NewLine&quot;,    BITS_NewLine      );
   defModSym(&quot;AppCuKeys&quot;,  BITS_AppCuKeys    );
+  defModSym(&quot;AppScreen&quot;,  BITS_AppScreen    );
 }
 

--- kdebase/konsole/konsole/keytrans.h  #1.22:1.23
@@ -25,5 +25,6 @@
 #define BITS_Shift      5
 #define BITS_Alt        6
-#define BITS_COUNT      7
+#define BITS_AppScreen  7
+#define BITS_COUNT      8
 
 #define CMD_none          -1


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>270918</commentid>
    <comment_count>4</comment_count>
    <who name="Waldo Bastian">bastian</who>
    <bug_when>2004-09-22 22:05:45 +0000</bug_when>
    <thetext>I have applied it, should it be used by the default keytab as well?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>270941</commentid>
    <comment_count>5</comment_count>
    <who name="Don Mahurin">dmahurin</who>
    <bug_when>2004-09-22 23:09:27 +0000</bug_when>
    <thetext>Yes, it makes sense to use it in the default keytab for shift 
application key support.
Attached is patch that I quickly created to support keys needed for 
shift selection:  shift-up,down,left,right,ins,del,pgup,pgdn (when in 
AppScreen mode).

Thanks,

-don

Waldo Bastian wrote:

&gt;------- Additional Comments From bastian kde org  2004-09-22 22:05 -------
&gt;I have applied it, should it be used by the default keytab as well?
&gt;  
&gt;

--- konsole/konsole/default.keytab.h	2004-07-26 15:23:02.000000000 -0700
+++ konsole/konsole/default.keytab.h	2004-09-22 14:09:31.738553760 -0700
@@ -21,6 +21,10 @@
   &quot;key Down -Shift+Ansi-AppCuKeys : \&quot;\\E[B\&quot;\n&quot;
   &quot;key Right-Shift+Ansi-AppCuKeys : \&quot;\\E[C\&quot;\n&quot;
   &quot;key Left -Shift+Ansi-AppCuKeys : \&quot;\\E[D\&quot;\n&quot;
+  &quot;key Up    +Shift+AppScreen   : \&quot;\\E[a\&quot;\n&quot;
+  &quot;key Down  +Shift+AppScreen   : \&quot;\\E[b\&quot;\n&quot;
+  &quot;key Right +Shift+AppScreen   : \&quot;\\E[c\&quot;\n&quot;
+  &quot;key Left  +Shift+AppScreen   : \&quot;\\E[d\&quot;\n&quot;
   &quot;key Enter+NewLine : \&quot;\\r\\n\&quot;\n&quot;
   &quot;key Enter-NewLine : \&quot;\\r\&quot;\n&quot;
   &quot;key Home  -Shift-AppCuKeys : \&quot;\\E[H\&quot;  \n&quot;
@@ -35,7 +39,10 @@
   &quot;key Delete-Shift : \&quot;\\E[3~\&quot;  \n&quot;
   &quot;key Prior -Shift : \&quot;\\E[5~\&quot;  \n&quot;
   &quot;key Next  -Shift : \&quot;\\E[6~\&quot;  \n&quot;
+  &quot;key Insert+Shift : \&quot;\\E[2;2~\&quot;  \n&quot;
   &quot;key Delete+Shift : \&quot;\\E[3;2~\&quot;  \n&quot;
+  &quot;key Prior+Shift+AppScreen : \&quot;\\E[5;2\&quot;\n&quot;
+  &quot;key Next+Shift+AppScreen  : \&quot;\\E[6;2\&quot;\n&quot;
   &quot;key F1    -Shift   : \&quot;\\EOP\&quot;\n&quot;
   &quot;key F2    -Shift   : \&quot;\\EOQ\&quot;\n&quot;
   &quot;key F3    -Shift   : \&quot;\\EOR\&quot;\n&quot;
@@ -61,9 +68,9 @@
   &quot;key F11+Shift    : \&quot;\\E[23;2~\&quot;\n&quot;
   &quot;key F12+Shift    : \&quot;\\E[24;2~\&quot;\n&quot;
   &quot;key Space +Control : \&quot;\\x00\&quot;\n&quot;
-  &quot;key Up    +Shift   : scrollLineUp\n&quot;
-  &quot;key Prior +Shift   : scrollPageUp\n&quot;
-  &quot;key Down  +Shift   : scrollLineDown\n&quot;
-  &quot;key Next  +Shift   : scrollPageDown\n&quot;
+  &quot;key Up    +Shift-AppScreen   : scrollLineUp\n&quot;
+  &quot;key Prior +Shift-AppScreen   : scrollPageUp\n&quot;
+  &quot;key Down  +Shift-AppScreen   : scrollLineDown\n&quot;
+  &quot;key Next  +Shift-AppScreen   : scrollPageDown\n&quot;
   &quot;key ScrollLock     : scrollLock\n&quot;
   &quot;&quot;
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>271222</commentid>
    <comment_count>6</comment_count>
    <who name="Lars Doelle">lars.doelle</who>
    <bug_when>2004-09-23 21:00:25 +0000</bug_when>
    <thetext>&gt;------- Additional Comments From bastian kde org  2004-09-22 22:05 ------- 
&gt;I have applied it, should it be used by the default keytab as well? 

I think, yes, as the modification does not break normal operation and the new 
feature should be available under normal operation

&gt; --- konsole/konsole/default.keytab.h 2004-07-26 15:23:02.000000000 -0700 

Changing the default keytab is slightly different procedure, though, as the 
original source is:

   konsole/other/default.Keytab

when change, the default.keytab.h is to be build using:

   $ cd konsole/konsole
   $ ./MakeDefaults

One might need to

   $ cd konsole/tests
   $ make quote

before.

This should end in your patch as well as in a changed default.Keytab, which is 
also a reference for the poor people who wonder how keys are interpreted.

I&apos;ve never included this build process into the regular Makefiles, as this 
operation is very rare.

-lars

</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>