t9term: cut, snarf, and paste with keyboard on Mac - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 7b08cf334b613a777a64ce41565b771d98740faf
parent 80c90f271e673a036cf208399cfc824e388249c5
Author: David Swasey 
Date:   Tue, 13 Apr 2010 13:16:36 -0700

9term: cut, snarf, and paste with keyboard on Mac

R=rsc
CC=codebot
http://codereview.appspot.com/854042

Diffstat:
  M CONTRIBUTORS                        |       1 +
  M src/cmd/9term/wind.c                |      16 ++++++++++++++++

2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
t@@ -8,6 +8,7 @@ André Günther 
 Anthony Sorace 
 Arvindh Rajesh Tamilmani 
 Benjamin Huntsman 
+David Swasey 
 Enrique Soriano 
 Eoghan Sherry 
 Fazlul Shahriar 
diff --git a/src/cmd/9term/wind.c b/src/cmd/9term/wind.c
t@@ -667,6 +667,22 @@ wkeyctl(Window *w, Rune r)
                 waddraw(w, &r, 1);
                 return;
         }
+        if(r == Kcmd+'x'){
+                wsnarf(w);
+                wcut(w);
+                wscrdraw(w);
+                return;
+        }
+        if(r == Kcmd+'c'){
+                wsnarf(w);
+                return;
+        }
+        if(r == Kcmd+'v'){
+                riogetsnarf();
+                wpaste(w);
+                wscrdraw(w);
+                return;
+        }
         if(r != 0x7F){
                 wsnarf(w);
                 wcut(w);