Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Mar 2001 15:30:21 -0800 (PST)
From:      nm@web.am
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/25499: buffer paste functionality from keyboard
Message-ID:  <200103022330.f22NULn37619@freefall.freebsd.org>

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

>Number:         25499
>Category:       misc
>Synopsis:       buffer paste functionality from keyboard
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 02 15:40:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Gaspar Chilingarov
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
WEB Ltd., http://www.web.am/
>Environment:
FreeBSD nightmar.web.am 5.0-CURRENT FreeBSD 5.0-CURRENT #7: Thu Feb 22
23:47:42 AMT 2001     root@nightmar.web.am:/usr/src/sys/compile/nm  i386

>Description:
 no problems at all :)
 attached patch changes ru.koi8-r.kbd and us.pc-ctrl.kbd files to use
 Shift+Ins - pastes buffer
 Shift+PrintScr - switches to previous screen(terminal)

 i do not know which .kbd file is used by default, so please also modify
 kbd file you are using - scan code is 102 for insert, 092 for PrnScr

if there is some problem with patch - please contact with me, 216.136.204.18 which is MX for freebsd.org , erfuses recieve messages from unresovable hosts :((((

>How-To-Repeat:
--
>Fix:
here it is the diff
--
--- share/syscons/keymaps/ru.koi8-r.kbd Thu Jun 25 13:21:10 1998
+++ /root/new/share/syscons/keymaps/ru.koi8-r.kbd   Fri Feb 23 00:19:29 2001
@@ -95,7 +95,7 @@
   089   cr     cr     nl     nl     141    141    138    138     O
   090   rctrl  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl   O
   091   '/'    '/'    nop    nop    175    175    nop    nop     O
-  092   nscr   nscr   debug  debug  nop    nop    nop    nop     O
+  092   nscr   pscr   debug  debug  nop    nop    nop    nop     O
   093   ralt   ralt   ralt   ralt   ralt   ralt   ralt   ralt    O
   094   fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49  O
   095   fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50  O
@@ -105,7 +105,7 @@
   099   fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57  O
   100   fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58  O
   101   fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59  O
-  102   fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60  O
+  102   fkey60 paste  fkey60 fkey60 fkey60 fkey60 fkey60 fkey60  O
   103  fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot   fkey61  O
   104   slock  saver  slock  saver  susp   nop    susp   nop     O
   105  fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62  O
diff -u -r -d -b -B share/syscons/keymaps/us.pc-ctrl.kbd /root/new/share/syscons/keymaps/us.pc-ctrl.kbd
--- share/syscons/keymaps/us.pc-ctrl.kbd    Sat May  6 23:26:42 2000
+++ /root/new/share/syscons/keymaps/us.pc-ctrl.kbd  Fri Feb 23 00:18:16 2001
@@ -95,7 +95,7 @@
   089   cr     cr     nl     nl     cr     cr     nl     nl      O
   090   rctrl  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl   O
   091   '/'    '/'    '/'    '/'    '/'    '/'    '/'    '/'     N
-  092   nscr   nscr   debug  debug  nop    nop    nop    nop     O
+  092   nscr   pscr   debug  debug  nop    nop    nop    nop     O
   093   ralt   ralt   ralt   ralt   ralt   ralt   ralt   ralt    O
   094   fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49  O
   095   fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50  O
@@ -105,7 +105,7 @@
   099   fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57  O
   100   fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58  O
-  102   fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60  O
+  102   fkey60 paste  fkey60 fkey60 fkey60 fkey60 fkey60 fkey60  O
   103   fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot   fkey61  O
   104   slock  saver  slock  saver  susp   nop    susp   nop     O
   105   fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62  O
diff -u -r -d -b -B sys/conf/options.i386 /root/new/sys/conf/options.i386
--- sys/conf/options.i386   Mon Jan 29 12:19:02 2001
+++ /root/new/sys/conf/options.i386 Fri Feb 23 01:11:16 2001
@@ -78,6 +78,7 @@
 SC_KERNEL_CONS_REV_ATTR    opt_syscons.h
 SC_MOUSE_CHAR      opt_syscons.h
 SC_NO_CUTPASTE     opt_syscons.h
+SC_KEYBOARD_PASTE  opt_syscons.h
 SC_NO_FONT_LOADING opt_syscons.h
 SC_NO_HISTORY      opt_syscons.h
 SC_NO_SYSMOUSE     opt_syscons.h
diff -u -r -d -b -B sys/dev/syscons/scmouse.c /root/new/sys/dev/syscons/scmouse.c
--- sys/dev/syscons/scmouse.c   Mon Oct  9 13:08:28 2000
+++ /root/new/sys/dev/syscons/scmouse.c Thu Feb 22 23:47:29 2001
@@ -88,6 +88,10 @@
 static void mouse_cut_line(scr_stat *scp);
 static void mouse_cut_extend(scr_stat *scp);
 static void mouse_paste(scr_stat *scp);
+#define SC_KEYBOARD_PASTE
+#ifdef SC_KEYBOARD_PASTE
+void keyboard_paste(scr_stat *scp);
+#endif /* SC_KEYBOARD_PASTE */
 #endif /* SC_NO_CUTPASTE */
 
 #ifndef SC_NO_CUTPASTE
@@ -595,6 +599,14 @@
     if (scp->status & MOUSE_VISIBLE)
    sc_paste(scp, cut_buffer, strlen(cut_buffer));
 }
+
+#ifdef SC_KEYBOARD_PASTE
+void 
+keyboard_paste(scr_stat *scp) 
+{
+   sc_paste(scp, cut_buffer, strlen(cut_buffer));
+}
+#endif /* SC_KEYBOARD_PASTE */
 
 #endif /* SC_NO_CUTPASTE */
 
diff -u -r -d -b -B sys/dev/syscons/syscons.c /root/new/sys/dev/syscons/syscons.c
--- sys/dev/syscons/syscons.c   Fri Jan 19 18:08:02 2001
+++ /root/new/sys/dev/syscons/syscons.c Fri Feb 23 01:14:49 2001
@@ -3061,6 +3061,22 @@
        }
        break;
 
+#ifndef SC_NO_CUTPASTE
+       case PASTE:
+#ifdef SC_KEYBOARD_PASTE
+       /* XXX need to set MOUSE_VISIBLE flag 'cause sc_paste
+              will not operate withot it */
+       i = scp->status;
+       scp->status |= MOUSE_VISIBLE;
+       keyboard_paste(scp);
+       scp->status = i;
+#endif
+       return NOKEY;
+       #else
+       case PASTE:         /* DO NOTHING */
+       return NOKEY;
+#endif
+
        /* NON-LOCKING KEYS */
        case NOP:
        case LSH:  case RSH:  case LCTR: case RCTR:
diff -u -r -d -b -B sys/dev/syscons/syscons.h /root/new/sys/dev/syscons/syscons.h
--- sys/dev/syscons/syscons.h   Fri May 26 07:03:32 2000
+++ /root/new/sys/dev/syscons/syscons.h Thu Feb 22 23:47:02 2001
@@ -548,6 +548,9 @@
 void       sc_remove_cutmarking(scr_stat *scp);
 void       sc_remove_all_cutmarkings(sc_softc_t *scp);
 void       sc_remove_all_mouse(sc_softc_t *scp);
+#ifdef SC_KEYBOARD_PASTE
+void       keyboard_paste(scr_stat *scp);
+#endif /* SC_KEYBOARD_PASTE */
 #else
 #define        sc_draw_mouse_image(scp)
 #define        sc_remove_mouse_image(scp)
@@ -555,6 +558,9 @@
 #define        sc_remove_cutmarking(scp)
 #define        sc_remove_all_cutmarkings(scp)
 #define        sc_remove_all_mouse(scp)
+#ifdef SC_KEYBOARD_PASTE
+#define        keyboard_paste(scp)
+#endif
 #endif /* SC_NO_CUTPASTE */
 #ifndef SC_NO_SYSMOUSE
 void       sc_mouse_move(scr_stat *scp, int x, int y);
diff -u -r -d -b -B sys/sys/kbio.h /root/new/sys/sys/kbio.h
--- sys/sys/kbio.h  Tue Sep 12 01:37:39 2000
+++ /root/new/sys/sys/kbio.h    Fri Feb 23 01:14:14 2001
@@ -173,6 +173,8 @@
 #define RALTA      0xa0        /* right alt key / alt lock */
 #define HALT       0xa1        /* halt machine */
 #define PDWN       0xa2        /* halt machine and power down */
+#define PASTE      0xa3        /* paste from cut-paste buffer */       
+
 
 #define F(x)       ((x)+F_FN-1)
 #define    S(x)        ((x)+F_SCR-1)
diff -u -r -d -b -B usr.sbin/kbdcontrol/kbdcontrol.c /root/new/usr.sbin/kbdcontrol/kbdcontrol.c
--- usr.sbin/kbdcontrol/kbdcontrol.c    Mon Oct  9 02:33:59 2000
+++ /root/new/usr.sbin/kbdcontrol/kbdcontrol.c  Thu Feb 22 22:55:29 2001
@@ -202,6 +202,8 @@
        return HALT | 0x100;
    case TPDWN:
        return PDWN | 0x100;
+   case TPASTE:
+       return PASTE | 0x100;
    case TACC:
        if (ACC(number) > L_ACC)
            return -1;
@@ -439,6 +441,9 @@
    case PDWN | 0x100:
        fprintf(fp, " pdwn  ");
        break;
+   case PASTE | 0x100:
+       fprintf(fp, " paste ");
+       break;
    default:
        if (value & 0x100) {
            if (val >= F_FN && val <= L_FN)
@@ -637,6 +642,9 @@
            break;
        case PDWN:
            printf(" PDWN, ");
+           break;
+       case PASTE:
+           printf("PASTE, ");
            break;
        default:
            if (value >= F_FN && value <= L_FN)
diff -u -r -d -b -B usr.sbin/kbdcontrol/lex.h /root/new/usr.sbin/kbdcontrol/lex.h
--- usr.sbin/kbdcontrol/lex.h   Tue Sep 12 01:37:42 2000
+++ /root/new/usr.sbin/kbdcontrol/lex.h Thu Feb 22 22:56:21 2001
@@ -63,6 +63,7 @@
 #define TRALTA     288
 #define THALT      289
 #define TPDWN      290
+#define TPASTE     291
 
 extern int number;
 extern char letter;
diff -u -r -d -b -B usr.sbin/kbdcontrol/lex.l /root/new/usr.sbin/kbdcontrol/lex.l
--- usr.sbin/kbdcontrol/lex.l   Tue Sep 12 01:37:42 2000
+++ /root/new/usr.sbin/kbdcontrol/lex.l Thu Feb 22 22:56:03 2001
@@ -70,6 +70,7 @@
 ralta      { return TRALTA; }
 halt       { return THALT; }
 pdwn       { return TPDWN; }
+paste      { return TPASTE; }
 
 NUL|nul        { number = 0; return TNUM; }
 SOH|soh        { number = 1; return TNUM; }
--cut here--

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

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




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