Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am thinking about retiring my portable for an iPad + keyboard. (With Amazon/Linode/etc as server.)

I tried the iSSH app and ran Emacs in a terminal (not X Windows), using the Apple external keyboard.

This is unusable. Some extra chars are generated with control-F and option for Meta (Escape) generates some extra characters. There are probably other problems.

Terminal programs can't just remove/add/modify stuff as they like! Especially not for Emacs!

This problem was discussed already at the iPad launch.

The specifics for iSSH was discussed at least last November. (A fix was promised for the next release, which was in March.) http://groups.google.com/group/issh/browse_thread/thread/b58508bb42a3241e?pli=1

I saw in other discussions a few months ago that the "Prompt" app should work better, but that it had other problems? It was updated a few weeks ago.

Any advice on how to make this work? Prompt?


Edit, a conclusion: I have checked Prompt now. It doesn't have programmable keys and no way to get the Alt X to send real ESC X. I'll see what chars are generated by the keyboard and if I can put that into Emacs.

So iSSH has programmable keys (and lots of other features) except for control keys, but no working Control. And Prompt has working Control keys but no possibility to set up keys. The union of them would be perfect. :-(

At least both applications are under active development, so this should show up.

share|improve this question
    
Just one tip that I found helpful: in many environments, an equivalent to Esc is Ctrl-[. –  Kai Carver Jul 26 '12 at 0:36
    
I was using Ctrl-[ to send Esc on my new logitech tablet keyboard until I realized there is a much more natural way -- fn-☐ (you know, that box-symbol key where the escape key should have been). Careful, if you don't hold "fn" down then it will just exit the ssh app. –  Tom McClure Oct 22 '12 at 22:31
add comment

migrated from stackoverflow.com Apr 9 '12 at 5:18

This question came from our site for professional and enthusiast programmers.

2 Answers

Prompt is generally considered to be the best (or at least among the best) SSH clients for iOS. I've never used it specifically for emacs (as I don't use emacs) but I've never seen it send strange extra characters, even when sending control characters to, say, nano.

Edit: Prompt version 1.3.2 now has a feature where you can use the Escape key as a Meta key.

share|improve this answer
    
Thanks! Does Option/Meta work? –  Bernt Budde Apr 9 '12 at 7:10
    
@BerntBudde nano doesn't use Option/Meta, so I don't know. –  CajunLuke Apr 9 '12 at 13:51
    
I tried Prompt and it doesn't seem to have any logic for using the Option key as Meta in emacs. Also, you only had three font sizes and hence irregular shell/Emacs window sizes. Why does BOTH ssh Apps go 95% of the way, with complex functionality, but stop before making it usable? :-( –  Bernt Budde Apr 10 '12 at 14:32
1  
@BerntBudde Panic's support is really good. If you ask them about your issue, they may be able to give you a workaround or they may be able to fix whatever bugs prevent it from working properly. –  CajunLuke Apr 10 '12 at 14:41
    
THanks, CajunLuke. If I had voting rights I'd vote you up. :-) I put my conclusions in the question above. When this feature get into the ssh clients, I'll update it. –  Bernt Budde Apr 11 '12 at 17:00
show 2 more comments

I have also started using Emacs via SSH from my iPad with an external Bluetooth keyboard. I'm using Prompt and I've come up with the following code to "re-enable" the Option key as Meta. most of the keys work except for B, E, I, N, U and `. Put this in your .emacs file. Note that I use the Dvorak layout and I haven't tested this with a QWERTY layout.

(define-key key-translation-map [?\C-h] [?\C-?]) ; Unmask 'delete' as backspace

(let ((translations '( 229 [?\M-a]  nil [?\M-b]   231 [?\M-c]  8706 [?\M-d]   nil [?\M-e]
                       402 [?\M-f]  169 [?\M-g]   729 [?\M-h]   nil [?\M-i]  8710 [?\M-j]
                       730 [?\M-k]  172 [?\M-l]   181 [?\M-m]   nil [?\M-n]   248 [?\M-o]
                       960 [?\M-p]  339 [?\M-q]   174 [?\M-r]   223 [?\M-s]  8224 [?\M-t]
                       nil [?\M-u] 8730 [?\M-v]  8721 [?\M-w]  8776 [?\M-x]   165 [?\M-y]
                       937 [?\M-z]
                        96 [?\M-~]  161 [?\M-1]   162 [?\M-4]   163 [?\M-3]   167 [?\M-6]
                       170 [?\M-9]  171 [?\M-\\]  175 [?\M-<]   176 [?\M-*]   177 [?\M-+]
                       182 [?\M-7]  183 [?\M-\(]  186 [?\M-0]   187 [?\M-|]   191 [?\M-\?]
                       198 [?\M-\"] 230 [?\M-']   247 [?\M-/]   728 [?\M->]  8211 [?\M-\-]
                      8212 [?\M-_] 8216 [?\M-\]] 8217 [?\M-}]  8218 [?\M-\)] 8220 [?\M-\[] 
                      8221 [?\M-{] 8225 [?\M-&]  8226 [\?M-8]  8249 [?\M-#]  8250 [?\M-$] 
                      8260 [?\M-!] 8364 [\?M-@]  8482 [?\M-2]  8734 [\?M-5]  8800 [?\M-=]
                      8804 [?\M-,] 8805 [?\M-.] 64257 [?\M-%] 64258 [?\M-^])))
  (while translations
    (let ((key (car translations)) (def (cadr translations)))
      (if key
          (define-key key-translation-map (make-string 1 key) def)))
    (setq translations (cddr translations))))

This gets Prompt much closer to the Right Thing. It still needs to handle the missing keys (which trigger 'chords' that input multi-character sequences) or disable "non-ASCII" input altogether, and a "use Caps Lock as Control" setting would be very nice also. I'll email their customer support and see what they say.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.