summaryrefslogtreecommitdiff
path: root/data/mobileterminal/arrowkeys.diff
diff options
context:
space:
mode:
Diffstat (limited to 'data/mobileterminal/arrowkeys.diff')
-rw-r--r--data/mobileterminal/arrowkeys.diff37
1 files changed, 37 insertions, 0 deletions
diff --git a/data/mobileterminal/arrowkeys.diff b/data/mobileterminal/arrowkeys.diff
new file mode 100644
index 000000000..6f2151475
--- /dev/null
+++ b/data/mobileterminal/arrowkeys.diff
@@ -0,0 +1,37 @@
+diff -ru mobileterminal-364/Sources/MobileTerminal.m mobileterminal-364+iPhone/Sources/MobileTerminal.m
+--- mobileterminal-364/Sources/MobileTerminal.m 2009-04-26 07:55:26.000000000 +0000
++++ mobileterminal-364+iPhone/Sources/MobileTerminal.m 2010-03-26 05:01:43.000000000 +0000
+@@ -212,12 +212,27 @@
+ - (void)handleKeyPress:(unichar)c
+ {
+ if (!controlKeyMode) {
+- if (c == 0x2022) {
+- controlKeyMode = YES;
+- return;
+- } else if (c == 0x0a) // LF from keyboard RETURN
+- {
+- c = 0x0d; // convert to CR
++ switch (c) {
++ case 0x2022:
++ controlKeyMode = YES;
++ return;
++
++ case '\n':
++ c = '\r';
++ break;
++
++ case 0xf700:
++ [self.activeTerminal.process write:"\x1b[A" length:3];
++ return;
++ case 0xf701:
++ [self.activeTerminal.process write:"\x1b[B" length:3];
++ return;
++ case 0xf702:
++ [self.activeTerminal.process write:"\x1b[D" length:3];
++ return;
++ case 0xf703:
++ [self.activeTerminal.process write:"\x1b[C" length:3];
++ return;
+ }
+ } else {
+ // was in ctrl key mode, got another key