Apple hardware and Linux

Part 2: Magic Trackpad and Apple Bluetooth Keyboard

Kai Koenig
4 min readNov 26, 2018

--

This is part of my series of “Moving to Linux” posts. It might be useful to read the introductory post to understand the context.

This post is about input devices: Apple’s Magic Trackpad and the Apple Bluetooth Keyboard. I’ve already written a post in which I talked about configuring the internal touchpad of my Linux laptop. At the same time I wanted to make an external Bluetooth mouse work for my left-handed requirements.

That little and cheap black Bluetooth mouse from that post mentioned above was always meant to be a stop-gap measure. I got it at Saturn in Germany for 4,99 Euros because I got the laptop fresh from there and needed some kind of mouse.

When working on my Apple hardware, I’d usually use a Magic Mouse on the iMac and the Magic Trackpad with a wired USB keyboard on the Macbook Pro. Additionally to that, I have another Trackpad and/or Apple Bluetooth Keyboard at my co-working space or at a client.

So, over the last couple of days, I tried out various of the setups with my Linux laptop.

I did some research before I even started. I realised that a lot of the posts on askubuntu.com or stackoverflow.com were about old versions of Ubuntu or Linux in general. People sometimes had to go through cumbersome efforts trying to get the Magic Trackpad going at all.

At some point I gave it a go and put both the trackpads and the Bluetooth keyboard into pairing mode. Slightly surprised they right away showed up under their previous names from OS X in the Ubuntu Budgie settings application.

Pairing

Connecting them worked without major problems. The Magic Trackpads didn’t need any verification at all for me. They connected, but it seems that if you get asked for a PIN, the correct one would be four times the digit zero: 0000.

The Apple Bluetooth Keyboard required a PIN on first pairing. Ubuntu popped up a dialog asking for it as part of the pairing. I entered it on the keyboard itself, pressed <Enter> and the pairing was completed.

Stability

It seems the Linux laptop behaves a bit more fiddly and flaky when it comes to connecting to the Apple gear. Not in a way that it’d be unusable, but in particular the pairing at my co-working space took quite a long time. The huge amounts of frequency pollution played a part in that. Pairing another trackpad at home was instant. I also found it useful to make sure that the Apple Bluetooth gear was disconnected from the Macbook Pro.

During ongoing use, it seems that it briefly disconnects and reconnects more often than before when I’m at the co-working space. I’m not seeing this at home. I had noticed this behaviour in noisy and polluted environments on the Mac before, but it seems to have increased with the changeover to Linux. I’m not sure if there’s anything that I can configure to alter this behaviour . It’s not even close to be annoying enough to bother me.

Gestures

In a nutshell, the Magic Trackpad is a pointer device and shows up on Linux when calling xinput from a shell. There are many ways people use the trackpad. On OS X and macOS it’s very popular to configure all kinds of two-, three- or even four-finger gestures to improve perceived productivity.

I never used a lot of these gestures because I’m much more into using the keyboard. Essentially for me, the trackpad acted as a simple touchpad, pretty much like a built-in touchpad on a laptop. I used it for primary and secondary clicks, cursor movements and two-finger scrolling. I never got into the elaborate ways people use their touchpads with multiple fingers and pinch/zoom etc.

My current Magic Trackpad on Linux pretty much delivers exactly what I need from this point of view and I’m very happy with that.

There are ways to configure and setup all sorts of gestures for more than two fingers and certain movements. I haven’t looked into them, but there are two tools that look promising:

Touchegg: https://www.addictivetips.com/ubuntu-linux-tips/get-macbook-touchpad-gestures-on-linux/

Fusuma: https://www.techrepublic.com/article/how-to-get-apple-like-gestures-on-the-linux-desktop/

As a final note: Some of the configuration options for primary and secondary clicks that I mentioned in my previous blog post are valid for the Magic Trackpad, too. They don’t apply for my setup because the default click behaviour of the Magic Trackpad already matches my expected behaviour.

I hope you find this informative and useful. As usual, I’d really appreciate any comments and feedback. You can find me as AgentK on Twitter.

Title photo: by myself

--

--

Kai Koenig

Building Web & Android apps in Kotlin, CFML, JS, Java… 💑 to @blauerpunto. Also: pilot ✈️ & Nintendo gamer 🎮: 4613–9999–2913 (3DS) & SW-3852–3319–8305 (Switch)