A while back I picked up a tiny, folding, wireless keyboard to turn my phone into a passable laptop replacement when traveling (thanks to some excellent apps and the power of SSH). It’s already incredible, and only one or two features are missing from iOS which would make it really amazing.
I picked up this wireless folding keyboard for $25 on Amazon. It’s only slight bigger than my phone itself (iPhone 12) and manages to fit in my jeans front pocket.
For many of my personal trips, bringing a full-sized laptop or even an iPad is overkill, especially if there’s only a 10% chance that I’ll end up using it. When I do wish I had a laptop, it’s usually because I want to do a little blogging or light programming.For example, the trip calls for nothing but day hiking, but one day we get rained out. Or the trip calls for nothing but skiing, but the first day I get injured.
Now, all I have to do is tuck this keyboard somewhere in a carry-on.
It’s the software that makes this setup workable as a short-term laptop replacement:
At home, I have a computer running SSH.
It happens that it’s a desktop running Linux, but it could just as easily be a laptop running macOS with Remote Login enabled in the system settings.
I have Tailscale installed on both my phone and the computer at home, filling the role of a VPN.
This lets my phone SSH to the computer while traveling without having to deal with setting up port forwarding (and thus exposing the computer to the public internet).
I have Blink Shell installed on my phone. Blink has a ton of features, but I basically only use it for the terminal SSH client.
There’s a lot of things I love about this setup:
I have access to every (headless) program installed on my computer.
I use Vim for blogging and programming, so I don’t need a graphical text editor, but Blink embeds VS Code for those who don’t. Blink’s copy of VS Code allows remotely editing files on any host that it can SSH into. I haven’t used it extensively, but it works shockingly well from what I’ve tried.
Tailscale gives me access to my blog preview.
Each device on a tailnet gets an IP address, so I can just point iOS Safari at
<computer-tailnet-ip>:4000
and preview my blog while I write.Side benefit: I’m reading the mobile version of my post while I write, making it less likely that the post looks bad on mobile (due to something like a super long line of code or wordy heading).
Blink pairs perfectly with AirPlay screen mirroring.
With the Blink app open in iOS screen mirroring mode, Blink magically uses the connected display as a full-resolution, non-mirrored external display. It turns any random smart TV into a 4K external monitor.
Without AirPlay, Blink plus the iPhone in landscape mode is passable: there’s plenty of horizontal space, but vertical space comes at a premium.I can get a 107x21 terminal with my phone on my lap and the text at a comfortable size. Plenty big enough for 80-character code lines plus some space for line numbers, but tedious when four of the rows are taken up with status lines and tab bars from Vim & Tmux.
How it could be amazing
It’s impressive how well it already works—I wrote this whole post with just phone and keyboard while waiting in an airport terminal!To get the images in the post, I have Dropbox on both my phone and the home computer, and Image Magick to convert & resize the photos.
But there’s a few things keeping this setup from being amazing.
For some reason,
Cmd-Tab
to switch to the most recently used app is one of the few keyboard shortcuts that doesn’t transfer from macOS. It’s crazy, because it works on iPadOS.This seems like an oversight? Surely someone at Apple could sneak this into a future iOS update.
Right now, my workaround is to use
Cmd-Space
to bring up “Siri Suggestions” (aka Spotlight-for-iOS) and type the name of the app I want to switch to.The input latency stacks up.
I haven’t isolated where the typing latency comes from, but I imagine it’s smeared across lots of things (my top hunches right now are: physical distance to the computer at home, lag in AirPlay screen mirroring, and lag in the Blink terminal emulator).
I try to minimize how much the lag affects me by using lots of keyboard shortcuts. I’ve included some of my favorites in the Appendix below.
iOS Safari doesn’t do the “AirPlay screen mirroring is external display” trick. If this worked, it would be absolutely killer.
It makes sense that iOS Safari doesn’t magically become full-screen by default—non power-users attempting to screen mirror would not expect it.
But it would be incredible if an iPhone could drive a web browser at a full 4K resolution. Given how many things are already possible to do with nothing more than a desktop web browser, having one on my phone would be huge.
Some apps only work in portrait mode.
Slack and the iOS Settings app are the two which don’t support landscape that I find myself wanting to use the most with this travel setup.
Slack is a double offender because it also doesn’t support any keyboard shortcuts on iOS that the desktop app supports, as far as I can tell.
Work vs personal
For light use cases, where I’m basically only blogging or writing code in Vim and compiling at the terminal, this setup is great.
But I have a dream of one day being able to use this setup for work trips too. Think of how cool it would be to travel to an office in another city, sit down at any desk, plug in my phone over USB-C and get to work. This is almost possible.
For me, the things holding it back are all related to where I work (where we can’t connect our phones to the corporate VPN) and how important Slack is for work trips (Slack doesn’t support iOS landscape mode, let alone the magical Blink external display mode). It’s so close to being a reality!
I have one of the most powerful computers ever built in my pocket at all times. It would be so cool if I use it like one, and we’re so close to being there.
Appendix: Fun keyboard shortcuts
Some of the keyboard shortcuts I noticed myself using the most while writing this post:
- iOS
Opt-Backspace
andCmd-Backspace
, which delete the previous word or line.Cmd-Space
, to bring up “Siri Suggestions” (which I only use to launch apps).Cmd-.
, which usually does whateverEsc
does on iOS.Actually typingEsc
on this keyboard requires pressingShift-Fn-`
which I find harder.
I don’t know the origin ofCmd-.
acting likeEsc
on macOS (and iOS by extension), but it’s right there in the Human Interface Guidelines.
- Safari
Cmd-L
to focus the address bar in Safari.Cmd-T
/Cmd-W
open and close tabs.Cmd-Opt-Left
/Cmd-Opt-Right
to go to the previous/next tab.Cmd-[
/Cmd-]
to go to back and forward in a tab’s history.
- Vim
Ctrl-W
andCtrl-U
in insert mode to delete the previous word or line.{
/}
to move back/forward a paragraph.[s
/]s
to jump to the previous/next spelling mistake (lots of typos on this small keyboard with the lag).z=1
(bound to<leader>z
) to accept the first suggested spelling correction.Ctrl-[
, which is the same asEsc
in terminals.
- Blink
Cmd-T
/Cmd-W
open and close tabs.Cmd-O
to toggle focus between the phone and the external display in screen mirroring.
In general, I’ve had great success by blindly trying macOS keyboard shortcuts and having them also work on iOS.