Apple’s JIS Keyboard layout and the ADM3A

A few weeks ago a blog post on catonmat.com showed pictures of the old terminal that Bill Joy used when he created VI.  Terminals back then didn’t have arrow keys so if you wanted to move the cursor around you held down some kind of modifier and hit the H, J, K or L keys.  And they were labeled as such.  This news didn’t really interest me because I’ve read that somewhere before but when someone on my twitter stream posted a picture of the keyboard I noticed how much it resembles my Mac’s keyboard layout.

Since I live in Japan I use a Mac with a Japanese keyboard layout. The standard Japanese keyboard layout is a little hard to get used to at first because while it is a QWERTY keyboard some characters are in different places.  The placing of the double quote character and the left and right parenthesis eventually grew on me, but I always had a nagging feeling that the Japanese keyboard arbitrarily changed the locations of these very important for programming keys for no good reason.

When I saw the keyboard layout of the ADM3A I realized that it was in fact kind of the opposite.  The US keyboard layout has changed significantly since the 70s, but the Japanese keyboard didn’t.  Apple even keeps the position of the CTRL key where it should be (To the left of A).

The legendary ADM3A keyboard layout. (credit. Wikipedia)
The Apple Japanese keyboard. The Standard Japanese Keyboard layout has the exact same number row keys as the ADM3A.

 

 

 

 

 

 

I think this might be one of the reasons that I’ve grown to like the Japanese keyboard layout.

My first Arduino

Yesterday my wife decided to buy yet another sewing pattern book and I decided to tag along.  As a Kindle user, there’s usually very little for me to do at a bookstore.  I usually just look around the IT section of the magazine rack and thumb through the amazing Ubuntu magazine, or Nikkei Linux.  This time though, a magazine called “Otona no Kagaku” caught my eye.

 

 

“Otona no Kagaku” is magazine that comes with some kind of sience related device inside that you can put together.  There were all kinds of projects from synthesizers to airplanes, all sorts of fun.  Kids today are so lucky, I wish I had a magazine like that when I was a kid.

Anyway I’m too old for most of them to be interesting but one of them came with an Arduino board (branded as “Japanino”).  Since the magazine cost about as much as a new pre-assembled Arduino + shipping I decided to buy it.  The magazine is filled with a bunch of projects other than the one on the cover and explains how to go about doing them.  It’s amazing all the cool things people are doing with the Arduino. One guy uses an array of Arduinos to electricute himself in the face it seems.  To each his own I guess.

 

The Persistence of Vision project was really simple to set up.  Just a few screws and the website had all the software you needed already.  Here’s what the finished product looks like.

 


The IDE is really simple.  It’s amazing how low the bar is to get code onto these things.  Way back when (circa 2005) I still had to build a cross-compiler environment.  The language is like a C version of Processing, which is really intuitive and gets rid of having to write a boiler-plate event-loop in the main function.

Now I’m thinking about what to do next.  At work I’ve been experimenting with a presence system based on bluetooth which automatically locks the computer when I’m out of range.  Unfortunately Bluetooth has a pretty long range.  I wonder if there’s any NFC shields for the Arduino.  It’d be pretty cool if you could use your phone as a smart-card via NFC.

 

 

Announcing Better Mail

http://www.appbrain.com/api/api.nocache.js

About a year ago I bought the first Android phone available in Japan for the sole reason of making apps. Unfortunately I’ve had very few itches that needed scratching.

About a month ago that changed, because the built-in Gmail app has a fatal flaw.

The Problem

If you temporarily lose connectivity while sending an e-mail, the e-mail gets stuck in a “Sending…” limbo.  There’s no way to re-send the message.  It’s not even possible to edit the message.  It’s not in the outbox, and not in the sent folder.

When OhLife first started I spent 30 minutes writing my first journal entry.  Unfortunately I’ll never get to read that post again because it never finished sending.

Also the native app doesn’t support Japanese emoji.  Which means that sometimes I get what looks like blank e-mail from my wife or my friends which were actually just full of emoji.

I decided to do something about it.  So I started using the Gmail mobile web app which doesn’t have this problem. Pretty soon however I started to miss the integrated experience of the native app.

My Solution

Better Mail is a native android app with a WebView hardcoded to mail.google.com.  But that isn’t all, it also listens to the same new e-mail broadcast as the Gmail app.  It will notify you of new e-mail without a constantly running background process.  It also includes a native menu so that you can navigate without having to scroll all the way to the top. Also, since Better Gmail is a separate application it stays in memory longer than a web-page would which makes it much less painful to use.  I also took the time to fix some of my pet-peeves with Gmail’s notification style. For example, I added a “Quiet Mode” feature that automatically turns off sounds and vibrations when you get new e-mail at 2 in the morning.

The Price

A buck.  Making this application wasn’t trivial, since I had to do some reverse-engineering.  While the die-hard Free Software nut inside me has some reservations about using DRM, it does improve performance a bit.  And performance is the biggest problem.

I have a lot of ideas in the pipeline that I could work on if there’s enough interest.  Eventually I would like to try injecting my own javascript code into the page to provide an even deeper level of integration.

Update:

I’ve decided to work on bigger and better things.  The code is now Open-Source (GPL) and available for free!

The Future

This app is definitely a minimum value product, there’s plenty of room to expand.  If anyone has a feature request let me know via e-mail or in the comments.

Valentine’s Day

I got Valentine’s day Chocolate from my Girlfriend!  I’m so happy. 🙂  It’s a box from Kobe Morozoff.  The company that brought Valentine’s Day to Japan.

I need to work double hard now to work off the calories.  f^_^;

EMobile D01NE on Ubuntu 7.04 Feisty Fawn

The EM D01NE is a (I think) HSDPA PCMCIA card. The driver for the modem comes with Ubuntu 7.04 (Maybe before). I get about 2Mbps from it (max is 3.8).

Getting this setup in Ubuntu is easier than getting it setup with Windows. The only gotcha is that you have to install Gnome-PPP first, since it doesn’t come with Ubuntu. I’ll try later using gnome-network-settings and report it in another post.

  • First install GNOME-PPP using synaptic or apt-get
  • Run it and press the setup button
  • Press the detect button, it should find /dev/ttyACM0
  • Speed: 460800
  • Phone Line: Tone
  • Volume: High
  • In the Init Strings change Init2 to ATH0E1
  • Leave Init 3 alone
  • Leave Dial prefix empty
  • Username: em
  • Password: em
  • Phone number *99***1# (Some people have success with just *99#)
  • Internet!

These instructions come from http://d.hatena.ne.jp/hayamiz/20070616/1181994636 (Japanese)

Japanese Keybaord-Fu

For the benefit of the Internet, the key combination Control+Shift+Hiragana_Katakana puts the keyboard to and from the qwerty layout. Unfortunately the story doesn’t end there. Control+Shift+Hiragana_Katakana actually alternates between half-width katakana layout and qwerty layout modes. If you are unlucky enough to accidentally press that key combination while in full-width character mode (Like I did) you will be pleasantly surprised to find that the same key combination doesn’t take you out of the Kana layout mode! The language bar isn’t going to help you either because the keyboard map between qwerty and kana mode isn’t handled in the input method! (Great design guys!). If you are in full-width character mode you need to press ALT+Hiragana_Katakana (TWICE!!!!) to get back into the full-width qwerty layout. This because the first time you press it it’ll take you into the full-width kana layout again!

(Since I map the Caps Lock key to Control, it might be possible that the combination is Caps Lock+Shift+Hiragana_Katakana. Changing this mapping in Windows requires messing with the registry so I’m not going to try it. Perhaps Lazyweb can confirm it for me. )

In the hour I spent smashing every key combination possible I found some other equally useless combinations. Here’s a list of my findings.

  • (Full-width mode) ALT+Hiragana_Katakana: Toggle qwerty and kana layout modes
  • (Half-width mode) CTRL+Shift+Hiragana_Katakana: Toggle half width querty and kana layout modes (toggles full-width romaji in full-width mode)
  • (Full-width mode) Shift+Muhenkan: Toggle between kana and full-width romaji
  • (Full-width mode) Shift+Henkan: Toogle between kana and half-width romaji modes

久しぶり

Well, it’s been a really long time since I’ve written an entry but I’ll try to get everyone up to speed about what I’ve been up to in the last few months.

The biggest news is that I’ve been accepted to do an internship at Matsushita (The parent company of Panasonic) for 6 months. It starts this June so I should be back in Japan on June 1st. It’s really exciting and a once-in-a-lifetime chance to get some real job experience in Japan. I just learned recently that this year is also the last year for JETRO, the agency that matches students with internships in Japan.

The title of the internship is “Modeling and Code Generation of ubiquitous device networks.” It sounds pretty interesting, and they are using Linux servers. I’m pretty sure that’s one place where I can be helpful.

This winter break I had a wonderful time in Puerto Rico with my girlfriend. She met nearly my entire family on my mom’s side of the family, but nobody on my dad’s side. Looks like one day we’ll have to go to PR together again. I think she’ll like the idea.

For spring break I went to Puerto Rico (again) with a few of my friends. They really enjoyed it and want to go back. I apparently make a decent guide to PR even though I probably know more about Japan. ^_^;;;

Well I guess that’s all the important interesting stuff. Let me know if you are going to be in Japan in the summer or fall!