Using all the buttons of a Logitech G500 on a Mac

For a while, I’ve been meaning to replace my current Apple Magic Mouse with something a bit more ergonomic. It seems like a few coworkers are quite happy with the MX Master, but it’s a bit pricey and, as it turns out, I already have a mouse that’s more ergonomic. A few years ago I got a G500 for gaming, but it also makes for a nice regular mouse.

My main problem switching to a more traditional mouse is that I’m really used to the gesture on the magic mouse to go back/forward, so I needed to replicate that.

Using Logitech’s Gaming Software, you can map the forward and back buttons, but they really just send ⌘-[ and ⌘-], which works for Safari, but not for other apps like Xcode.

Screen Shot 2015-11-23 at 16.25.45.png

Searching about it, I discovered BetterTouchTool, a nice free app that let’s you customize gestures, buttons, and keyboard shortcuts. It looks way more powerful than what I’m currently using it for, but it gets the job done.

My first problem was that it didn’t recognize the back/forward buttons on the thumb area. From what I’ve read, the mouse doesn’t send mouse events for those but keystrokes for whatever reason. It now makes sense that I got the new keyboard assistant when I first plugged it in.

Screen Shot 2015-11-23 at 16.24.21.png

The G500 detected as a keyboard

I next tried to map the scroll left/right to back forward, which felt a lot like the magic mouse, until I had to actually do horizontal scroll and I was stuck.

My final solution works, although it’s definitely hacky: map the back/forward buttons to a keystroke that I won’t normally use (in this case F13, ⇧-F13), and then map those to the gesture in BetterTouchTool

Screen Shot 2015-11-23 at 15.37.13.pngScreen Shot 2015-11-23 at 15.37.57.png

After an hour of usage, I wasn’t missing my Magic Mouse at all, but my hands started to get tired. Then I remembered to remove all the weights :facepalm:


These are great for FPS, not so much for extended usage

Decluttering: mobile edition

Since I got a new watch a few months ago, I find myself looking at my phone less by accident. By that I mean those times when you just wanted to check the time and saw a notification, ended up checking email or Facebook anyway, and spent 10 minutes looking at the phone doing nothing useful.

But still there’s a number of times when that happens, mostly because of notifications. Having more Facebook friends than the years has days means that pretty much every day is somebody’s birthday. And so when I pick the phone in the morning the first thing I see is a Facebook notification about it, which gave me an excuse to open Facebook. I noticed that, for a while, the first thing I did in the morning was checking Facebook, and it didn’t feel right at all.

There’s also those times when you are slightly bored and go to your phone out of habit. I would check Facebook again, or maybe play a game, or catch up on blogs on Feedly.

I felt I was spending way too much time and attention on things of little value, so I stopped. This is my home screen today:

Screen Shot 2015-08-17 at 15.52.28

What you won’t find in there (or the other screen): Facebook, Twitter, games, Feedly, Flipboard, Zite.

I kept Pocket since at least that has content that I already selected myself. Other than that, if I’m checking my phone to kill some time, I have books.

I’ve had this going for almost a month and while I’ve barely had any notifications making me check my phone, I still have the habit of checking Facebook way too often, even from Safari.

I got a new watch

I think the last time I used a wristwatch I was still in high school. I got it as a birthday present and I can still remember that feeling of wearing an adult watch: it was made of steel —or at least it looked that way— and it was way more elegant than those cheap plastic digital Casio watches that beeped every hour and had multiple functions.

One day the battery died and the band broke so I took it to the shop to have it repaired and the battery replaced. I can’t remember what happened but when I came back for it they hadn’t repaired it, I got angry at the shop and put the watch in a drawer. I never took it for repair, or see it again. 

Fast forward to this year, and everyone is gossiping about the Apple Watch. Since I work on the iOS platform I’m usually overexposed to all things Apple. So I kept reading about smartwatches for a long time.

A few years ago, I probably would have wanted one, but now I couldn’t figure out how it would be useful to me today. But there was this one thing: I started liking the idea of having a watch again. Or more specifically, I started craving a nice old fashioned Swiss watch. At least until I saw their prices.

One day I was shopping for something else in a sports store and found this beauty at the outrageous price of 15€:  

I really liked the simplicity in the design, and how it was elegant without being fancy. And have I mentioned the price?

After a couple months with it, I couldn’t be more happy. I can think of a few ways this is better than an Apple Watch:

  • Compared to the 400+€ of the sport edition, or the 1200+€ of the steel Apple Watch that I liked, this one feels practically free.
  • Battery life is measured in years, not hours. I really don’t miss having to charge yet another device. 
  • Being able to just look at the time has made me pull out my phone less, which meant less time wasted on distractions. I don’t want to bring notifications to my wrist, I want less of them. 
  • It was very clear on the packaging that I could swim with it, and I’ve done it without issue. 
  • I’ve dropped it a few times and didn’t even care.
  • I watched my baby chew on it as he was vomiting, and it made me laugh not cry.
  • It will probably be as useful in five years as it is today, maybe many more.  Even if it wears out after a couple years, for the price of one Apple Watch I could buy a lifetime supply of these.

A few years ago, I was one of those people who thought it was silly to have a device that just told time. Now I’m happy to have a watch that doesn’t tell me who liked my latest picture when all I want to know is the time. 

    Safety warnings

    This is just a regular inflatable baby pool  

    This is the safety warning for Europe  

    This is the safety warning for Australia  

     And this is for the US 


    Fuck Xcode

    Two years ago, Brent Simmons introduced ded: a handy little alias to deal with Xcode quirks

    alias ded='rm -rf ~/Library/Developer/Xcode/DerivedData'

    It has been useful, but since recently it was not enough. Sometimes, Xcode will complain about not being able to use the simulator, even if it’s not running.

    Screen Shot 2014-10-15 at 14.02.21

    Or things will just fail randomly and often, leading to frustration and anger.

    Eventually, ded was not enough, so here’s my replacement:

    alias fuckxcode="pkill -9 -i 'ios simulator|xcode' && rm -rf ~/Library/Developer/Xcode/DerivedData && open"

    And I’ll quote Brent again on Bugs:

    In the old days, programmers spent hours and days and weeks working very hard, and sometimes brilliantly, on difficult things that no one had ever done before.

    These days, programmers spend hours and days and weeks working very hard, and usually unsatisfactorily, on getting around bugs in their platform.

    Impossible debugging

    If your first reaction on witnessing a bug or seeing a bug report is “that’s impossible,” you are plainly wrong. Don’t waste a single neuron on the train of thought that begins “but that can’t happen” because quite clearly it can, and has.

    From The Pragmatic Programmer

    I should print that and hang it on my wall because some days one needs to be reminded there are no impossible bugs, even when things just don’t make any sense.

    Canyons Resort

    Canyons Resort

    I love the colors of the mountains here.

    Oxen to grams

    Screen Shot 2014-09-08 at 12.29.45

    OK Google, I actually wanted to convert ounces, but how fun it’d have been if you actually converted 16 oxen to grams, xkcd style.

    Edit: it turns out, they already know the <del>weight</del>mass of an ox.

    Screen Shot 2014-09-08 at 12.44.50

    Read More

    Achievement unlock: unbricked


    I just unbricked a router through its serial port using an arduino. As much as I wished to go back in time and leave the router alone during the process, when I saw the console in my laptop screen I had a wonderful Eureka moment.
    After a whole day of trying (and failing) to replace my ISP router, I could use a win, even if that just meant leaving everything exactly as it was this morning.

    Get every new post delivered to your Inbox.

    Join 2,456 other followers