New Update from Sendai
A professor of nuclear physics just came and talked to us at my dorm. There are only 2 people plus 3 staff left here, out of about 30 people total. Tohoku University is officially closed until April 25 and students are supposed to go home if possible. Depending on the food and power situation, he is anticipating inspection and cleanup at the university buildings next week and some resumption of research in early April.
The radiation output at the reactors has been around 0.5mSv per hour (I got this update about 30 hours ago). Normal human absorption is 3.5mSv per year. Unless you are very close this is not even detectable.
The professor has been measuring levels in his apartment in Sendai. I believe he said he normally measures a rate of 0.1mSv per hour (before the earthquake). I don’t know how the detector measurement compares to rate of absorption. What I do know is that the maximum he has measured is 0.6mSv per hour, for short periods (a few hours). This is 6 times normal, and he said it is not a problem for short-term exposure until you get to about 100 times the normal level. He is not leaving Sendai but advises students to leave because it could be more difficult to leave in the coming weeks and there is no point staying when there are no classes.
I am now hearing reports of loss of water in one reactor. As far as I know this will make cleanup very hazardous but is not a hazard to the general public, especially outside of the evacuation zone.
There is a group of 10 attempting to get to Tokyo tomorrow. The route is bus or car to Yamagata, then local trains to Niigata, then shinkansen to Tokyo. The same professor from above organized escorts for us. We’re expecting it to take two days but if we get stuck, we should be OK in a group.
Update from Sendai
Many people are leaving Sendai, but it is very difficult to go South to Tokyo, which is where most need to go. At the moment it is a 500m bus lineup followed by an apparently 20 hour long journey. They will run out of fuel in a day or two but I think it won’t take long to start getting more, as food only took one day to start arriving.
I’m the only english speaker left at my dorm, so I am heading to stay with another group of people on the ground floor of an apartment building.
I already had a bus ticket to Tokyo for this weekend. I have no idea if I can get on that bus. It will need to be rerouted as normally it goes though Fukushima.
University is closed until at least May. My internship was supposed to end in late April. My current plan is to get to Tokyo when I can, and then make a decision on staying to finish my work or leaving.
There is a small amount of work to get part of our GLXP rover to Europe for testing and demonstrations. I will be bringing those parts to Tokyo in order to ship them. The rest of the rover is safe in my dorm.
If I get stuck in Sendai I should be safe. There were a couple of large (M6?) aftershocks today and they are expected for one month up to M7 (100 times less energy than the original). There is plenty of food and water available and my dorm now has water, power and internet.
The main concern is nuclear fallout but from what I understand of the design and situation of the reactors were are reasonably safe. Preventative medicine is available if it is needed and the worst case scenario does not involve danger at short-term exposure lengths.
Many thanks to the heroic nuclear workers who have sacrificed their lives keeping the country safe.
OK in Sendai
I am OK in Sendai, as is everyone I know here. Thank you everyone for the messages.
They are already starting to restore power and water to the city of Sendai.
The earthquake itself was pretty scary but afterwards everything is very well organized; we waited outside after the earthquake and eventually were allowed to grab our stuff from the lab. We left quickly after an aftershock and possible gas leak. At my dorm we are staying together in a group.
Where I am located in the city I don’t have running water or power but we are safe with lots of food and water.
Although the shaking was quite violent, there are no buildings in the city itself that collapsed and flooding was confined to the subway system as far as I know. We knew it was serious right away as it was the first time we heard the early warning detection alarm (3 seconds before) and it was impossible to stay standing.
It was much worse to the West where soil conditions are worse and to the East where tsunamis hit. We weren’t aware of how serious things were until we heard news reports.
In the city today, restaurants were giving free food and people were in good spirits, although you can see smoke from fires near the coast and there are smaller fires in the city.
Local groups are also making rice and soup for people. Basically the same food I’ve been eating since I arrived, but it’s not lukewarm like at the cafeteria!
Convenience stores were open today, where people patiently lined up in the dark to buy a couple of day’s worth of food each. I got food there, and was also given food by the school, as well as flashlights and batteries.
Amazingly, a handful of stores and bars where even open by the main station this afternoon.
There are buildings designated as refuges where people in tall and evacuated buildings are staying.
The news images are not from Sendai city, they are from surrounding areas. The aftershocks were quite large and frequent until this morning but have subsided now.
The nuclear reactors are not posing a serious risk according to local media, and despite the recent explosion widespread fallout is not a strong possibility for this type of plant and failure.
We are not sure if/when we can go back to the lab. Many experiments were damaged but our rover was OK when we left it. I am uploading pictures from the lab and city now.
I’m currently with friends in the city centre where we found power and 3G internet. I should be able to update occasionally directly and via friends (email is sporadically working on my phone).
I want to stress that I am OK and in a safe place.
Here are the pictures:
iPhone 4 unlocked
I was able to get my iPhone 4 unlocked after about two hours on the phone with Rogers. I called them using skype from my dorm, and after about an hour of getting transferred to wrong department after wrong department, I got to the “unlocking department”. This is where I found out that I couldn’t get my phone unlocked because my account was inactive (therefore they couldn’t charge me the $50 fee).
I complained to the service rep that nobody told me this, and it didn’t make sense because cancelling and unlocking are two activities that should go hand-in-hand. He asked for my IMEI number and it seemed like I was going to get my phone unlocked for free. I started to recite it: “1..”
*skype error: lost connection*
“hello?”
Pissed off, I posted my annoyance to facebook, and walked to my lab to use the more reliable wi-fi connection to call Rogers back. At the lab, I used my iPhone 3GS to call Rogers over skype. Did you know skype for iPhone has a bug that prevents button presses after a push notification is received during a call? Just as the Rogers system was asking me to punch in my phone number, my friend Eric replied to my status on facebook: “any updates?”
Well yes, the update is that I have to start over again because your push notification broke skype. Only a few lost minutes, though. This time it only took me half an hour to get to the right department. And this time they flat-out refused to help me without an active account and I was transferred to a different department.
10 minutes later, I had a reactivated account and was once again reciting my IMEI number. I was informed that next time I plugged into iTunes, my phone would be unlocked by Apple. I fully expect that I will get a bill from Rogers for the $50 fee, plus who knows what other charges that come with reactivating an account. I was clear that it’s supposed to be for the purposes of billing for unlocking only, and was not told otherwise but, well, it’s Rogers.
It wasn’t unlocked when I plugged it into my macbook. I waited an hour; still wasn’t. I searched the internet to see how long it normally took –supposed to be instant. I searched to see if it wasn’t working because I was jailbroken. Unfortunately, it’s impossible to find any information about the official unlock on a jailbroken phone because there is so much discussion about unofficial unlocking.
So I tried restoring to non-jailbroken state. Instantly after that, iTunes said “Congratulations, your iPhone is unlocked.” So I guess the official unlock doesn’t work when you are jailbroken. No matter, 10 minutes later I was once again jailbroken as it’s still required for me to change the APN settings to get free MMS working in Japan (see previous post).
Next I cut my SoftBank sim card to microsim size, using my Rogers microsim card as a guide. I had to cut through some of the metal contacts, which I was nervous about, but the sim card worked fine after.
I followed my own instructions from my previous post to quickly get MMS working again, and everything seems to be working fine.
Update 2011-02-28
I received a bill in my email from Rogers. When they reactivated my account to send me a $50 unlock bill, it restarted all of my services, my phone number and contract! I did not agree to any ot this.
After hours on the phone and talking to several different people, they are adamant that I intended this and seem shocked that I am surprised that a call to unlock my cancelled phone resulted in starting all service again. Unlocking a phone to use on another network is the exact opposite of wanting a contract!
They claim that the only way to unlock my phone was for me to restart my contract (refunding my cancellation fee to my account in the process), restart my phone number and start Billing my monthly again. One of the requirements to unlock is that the phone is paid for fully. As far as I know the only way to do this, outside of waiting for three years, is to cancel your contract and pay the termination fee. This whole thing is very bizzarre and frustrating.
So currently I am stuck with over a month’s worth of charges and a contract. To cancel again they say I must pay for an additional 30 days, and give back the cancellation fee (this part I am OK with).
All told, I am being billed about $220 extra for the pleasure of having a SIM card in a drawer somewhere that might have worked if I went back to Canada and put it in my phone.
I go nowhere talking to them about reversing the charges and have filed a complaint with the CRTC who apparently is supposed to mediate in these types of cases.
I brought 2 iPhones to Japan with me: my 3GS, which is paid for, contract-free, and unlocked (by me) and my iPhone4, which is paid for, contract-free, jailbroken, but locked. My intention was to buy a prepaid sim card here and use the 3GS until the iPhone 4 is unlocked by the dev-team.
Unfortunately, there are a few snags: there is no iPhone 4 unlock in sight (for my firmware version) and it’s difficult to get a sim card here. The first problem might be solvable. It seems that Rogers might be unlocking paid-up phones. Based on the comments on that story, it might be possible to do by phone.
Secondly, I’m not sure if my sim card can be cut to micro-sim size. Most can, but as you can see in the picture, my Softbank Japanese sim card (white one in lower right) has the huge contacts that would need to be cut through in order to fit exactly the microsim size (my Rogers micro sim is lined up to the right of it). Since the chip is likely below the contacts, I don’t want to cut there. Cutting just the contact part of the card will give the perfect dimensions, but the contacts are just on the edge of not lining up, judging by the wear marks on my Rogers micro sim. Only one way to find out, right?
I will find out the answers to these questions, but in the short term, I’m using my old iPhone 3GS. It was a bit of a process to get a prepaid sim card in Japan. Although data is not possible with a prepaid card, email is (for ¥300 per month with Softbank). It is also quite a process to get that email working on an unlocked iPhone, so I’ve detailed it in this post.
Update: Although getting my iPhone 4 was a pain (possible to do by phone but it took over 2 hours), cutting the microsim was easy and worked perfectly.
Using your unlocked iPhone in Japan
The problem
In Japan, you can’t just go to the convenience store and buy a sim card. You are supposed to be a resident with an address before getting a phone. It is possible to rent a sim card or phone, but it’s expensive. For my purposes, I only needed email and voice (not data), so I got a prepaid sim card from SoftBank, which gives unlimited email (to your SoftBank address only) for ¥300 per month. I came across a ton of conflicting and outdated information on the internet about how to get a sim card and how to use an unlocked iPhone in Japan.
A note about data plans
It may be difficult to get any sort of plan (including data), unless you have a 2+ year visa to stay in Japan. And if you do get a data plan, it will not be void with a non-SoftBank handset according to your contract. Some people have had success using an unlocked iPhone with data, and some have been dinged with ¥100,000 monthly bills. The price to get an iPhone with your contract is something like ¥450 per month, so just I would just save myself the hassle and get a SoftBank iPhone, as I don’t speak enough Japanese to argue about bill amounts.
The steps
Thanks to this site for the required settings. Note that you really do need an alien card to do this (and you need a non-visitor visa to get that, i.e.: you need to be living in Japan). If you want a prepaid sim card for you Japanese vacation, your only hope is renting one, or buying a used one on ebay. And since sim cards are tied to your passport and/or alien card, I don’t think many people will sell you their old one. With that little caveat out of the way, below are the steps to get voice and unlimited email on your unlocked iPhone. These steps are for a jailbroken and unlocked iPhone 3GS running iOS 4.0.1, with Cydia and SSH installed. This may work for an iPhone4 (I plan to test this) but it requires cutting your sim card to microsim size. If you are not familier with unlocking, Cydia and SSH, do some research and then come back.
- Get the basics done
- Jailbreak and unlock phone. Install SSH (if your phone is factory unlocked it will still need to be jailbroken)
- Install an SSH client for file transfer on your computer (if you don’t have one)
- Go to the SoftBank store
- Bring the following with you to a SoftBank store:
- alien card (temporary alien card application paper and passport is acceptable)
- your Japanese address
- your Japanese home or work phone number
- Here is a list of stores with English speakers, but most stores will have someone that can help you in english.
- Ask for a pre-paid phone and top-up card.
- Get the cheapest one they have. Mine was ¥2,000 plus a ¥3,000 top-up card. I got handset model SC740, but I’m sure that the cheapest model changes regularly.
- They will not sell you a sim card only, unless you have a used SoftBank handset.
- The information online about buying a sim card only is outdated -they will not sell you one. You need the handset for step 3 anyway, so just buy it!
- Get them to set the phone’s menu and voice menu to english.
- Bring the following with you to a SoftBank store:
- Top up your phone and set email address
- Call 1400 and top up the phone balance using the instructions on the top-up card and activate the ¥300 monthly email option.
- Change your email address to whatever@softbank.ne.jp using the phone’s built-in WAP browser (it’s probably a yahoo! button). There is hyperlink to change the language to english.
- Patch commcenter on your iPhone. If you skip this step you will lose settings on each reboot.
- Set up iPhone to accept new settings
- Move sim card from your Japanese handset to the iPhone.
- Use SSH and your favorite text editor to backup and then edit the following file:
- /System/Library/Carrier Bundles/Softbank_jp.bundle/carrier.plist
- Add the following lines, directly below <dict> at the top of the file
- <key>AllowEdgeEditing</key>
- <true/>
- Change settings to allow MMS on your iPhone using your @softbank.ne.jp address
- Go to settings>messages
- Turn “MMS Messaging” to “on”
- Put your @softbank.ne.jp address in the “MMS Email Address” field
- Go to settings>general>network>cellular data network
- In the “cellular data” section, blank all fields
-
- In the “MMS” section, make sure the following are set:
- APN: mailwebservice.softbank.ne.jp
- Username: softbank
- Password: qceffknarlurqgbl
- MMSC: http://mms/
- MMS Proxy: smilemms.softbank.ne.jp:8080 sbmmsproxy.softbank.ne.jp:8080
- MMS Max Message Size: 307200
- MMS UA Prof URL: <leave blank>
- In the “MMS” section, make sure the following are set:
- Go to settings>messages
That’s it. You should now be able to send end receive emails with your @softbank.ne.jp address using the messages app (not the mail app) on your iPhone, as well as make and receive voice calls. There are multiple ways to do steps 5 and 6, such as installing a text editor on your iPhone, but I didn’t do it that way so I can’t recommend it. Apologies for the weirdly formatted ordered list.
Update: I was getting frustratingly sporadic MMS functionality. I found that it would always work right after a reboot, but not some minutes later. I found a different MMS proxy to use that seems to be working reliably.
Occasionally (I think if the sim card is jostled or if a no-service region is entered, the APN settings get reset and MMS stops working. I haven’t found a way around this yet. It might be possible to lock the carrier settings file (using unix permissions) so that iOS can’t change it.
Fare cards in Vancouver
This is a sloppy repost of a reddit comment I made, but I wanted to put it out there.
We have known for some time that against all sound advice, Vancouver has decided to move towards fare cards. The issue at hand has always been fare evasion, even though installing and running the new system will cost more than it saves. An article today suggests that this could mean a move to distance-based fares. This is a horrible idea for Vancouver
The three zone system is already more expensive to use than other similar size cities with “OK” transit. But I it’s a reasonable tradeoff to encourage people to work close to where they live without being so expensive that they just move even farther away and drive everywhere. This change might make sense from a short-term budgetary standpoint (see below), but Translink is supposed to have a mandate to increase ridership and reduce environmental impact of transportation in the area, not just to balance a short-term budget.
It finally makes sense to me why they are putting the system in place now -so they can charge for distance travelled. I know this is only one possible configuration of the cards, but it’s the only one that adds up.
In Vancouver, renting in the suburbs is quite a bit cheaper than living close to downtown. It’s already fairly inconvenient for a lot of suburbanites to use transit, but even with a three zone pass for working downtown, one can save a lot of money by living in Delta or Surrey. Right now the balance of convenience and cost means most people drive. This change could potentially move the balance so that even more people choose to drive. We need to shift the balance the other way.
I my perfect world I would shift the balance like this: transit users would indeed pay for distance travelled, but motorists would too. Motorists are charged taxes on gas now, but it is nowhere near the actual cost of road construction/maintenance per kilometre travelled. Motorists would also pay congestion charges like those in London to bring the externality of making downtown suck into the equation. Imagine a downtown with several pedestrian areas, like Granville street was for a brief time.
Politically, that’s just not going to happen. So we need to keep flat-rate transit to compete with (almost) flat-rate driving.
Before the suggestion of distance-based fare, I couldn’t figure out how the change was justified. Fare evasion is a small problem, by Translink’s own numbers. Using fare check staff like they already do on Canada line is a pretty cheap way to deal with the problem, instead of putting in turnstyles. Turnstyles require staff at each gate anyway (that’s at least two per station) to prevent hop-overs and help wheelchairs, new customers, people that payed too little/too much, etcetera, through the process.
I am not totally opposed to distance-based fare in all cases. It works in the mature systems of London and Tokyo because it is convenient to take transit compared to other modes. You can charge more and people will still pay for the convenience. We are not at that stage in Vancouver yet. We need a cost incentive to continue to increase ridership.
At a very basic level, I think public transit development should work as follows:
1. Increase ridership to:
2. Justify an increase in convenience (add routes and frequency). Repeat 1 and 2 until service is worth more so:
4. Increase cost per distance travelled to:
5. Pay for an increase in convenience to:
6. Increase ridership
In steps 1 and 2, you have to use quality of life and environmental justifications. Once you get to 4,5,6, you can use money to make decisions, and reach an equilibrium of convenience and fare people are willing to pay. We are in steps 1 and 2 now. Making changes now that do not increase ridership or convenience will doom our transit system to stagnation, or even decline.
One more corollary I wanted to add, but wasn’t sure where to fit it in: any decrease in convenience should not decrease cost to the user. Vancouver does a good job of this right now, which is rare for North America. In most cities, transfers between routes add cost to the journey. I’m worried that distance-based fares will do this, as transfers tend to make your route indirect. This really screws up city planning, because it encourages 1970s style infrequent, circuitous, transfer-free routes instead of a grid of routes with frequent vehicles.
tl;dr
Politically, we can’t make motorists pay actual per distance costs, so we shouldn’t make transit users do the same thing. The proposed per-distance fare will shift the balance even more towards motoring and encourage 1970s transit planning. We need to make transit better now, even at a monetary cost to increase ridership. It’s worth it for quality-of-life and it’s the only way to balance the transit budget in the long term. You can’t force transit to make money, you have to make it convenient enough to compete with other modes.
Skepticism and wikileaks
This was originally a comment on someone else’s excellent blog, but I wanted to expand my thoughts a bit. Most of the discussion about wikileaks this week has been about wikileaks itself, Assange, others’ opinions of him, but not the cable content. I’m not sure that speaks more to how the media has shifted from journalism to celebrity stories, or to the banality of the cables. Either way, I’ve been troubled by some comments I’ve seen.
The focus right now is on the rape charges, with a few common reactions from the internet. I am seeing some of the skeptics toss skepticism aside because they like Wikileaks.
The charges are trumped up to get him extradited.
The justification given here is speculation that one of the accusers is somehow connected to the CIA and that it’s highly unusual to see an Interpol red notice for his situation. Did anyone even bother to look up what a red notice is?
The persons concerned are wanted by national jurisdictions (or the International Criminal Tribunals, where appropriate) and Interpol’s role is to assist the national police forces in identifying or locating those persons with a view to their arrest and extradition.
…
The person should be considered innocent until proven guilty.
Emphasis from Interpol, by the way. Here is Assange’s notice. It says “sex crimes” on it. I looked up the same term in the search engine. 455 hits. That’s a lot for a supposedly uncommon use of a red notice. For reference, “drugs” yields 804 hits, and “terrorism” yields 355 hits.
Let’s be critical of all claims, not just those that agree with our beliefs. Beyond that, it’s not ok to shrug off rape charges. Let’s keep the different issues separate and hope for a fair trial for the sake of, you know, everyone. And I don’t see a reason to think that it won’t be a fair trial in Sweden. Which brings me to the next common claim:
It’s not even for rape, it’s for “sex-by-surprise” and it amounts to unprotected, consensual sex.
Here’s a clarification from Downing Street:
The court heard Assange is accused of using his body weight to hold her down in a sexual manner.
The second charge alleged Assange “sexually molested” Miss A by having sex with her without a condom when it was her “express wish” one should be used.
The third charge claimed Assange “deliberately molested” Miss A on August 18 “in a way designed to violate her sexual integrity”. The fourth charge accused Assange of having sex with a second woman, Miss W, on August 17 without a condom while she was asleep at her Stockholm home.
Those are rape charges. So let’s stop smearing the accuser, stop giving Assange a free pass, listen to Interpol’s bolded advice and then leave it to the courts. This is a separate issue from the existence of wikileaks (unless his celebrity status as founder was a factor). His high profile might have been a factor in the issuance of a red notice, or it might not have. It doesn’t matter. It’s reasonable for a trial to take place.
Back to the legality of wikileaks itself, it seems like Assange is in the clear on that front thanks to European laws. There is some question if he will be able to travel freely to the USA in the future depending on whether or not wikileaks is considered legitimate journalism. I think it will be, in the end, now that virtually every news organization has used material from wikileaks.
Key Remapping in Windows
After I got all of my terminal keys working properly in OSX I was happy. No more fumbling with different shortcut keys in different applications. Until I used boot camp to run windows.
I like Windows 7. But there are many reasons why it doesn’t compete with OSX for me:
- The window management is not as good as OSX. It’s improved a lot over previous versions, but nothing beats spaces and expose for me. I also prefer having one single menu bar for everything, I like that I can close all applications without quitting the application. In short, it works better for multi-tasking.
- OSX is POSIX-compliant enough that I’ve never had major problems compiling anything that compiles in Linux. On top of that, the excellent macports project makes compiling from source easy, just like ports in FreeBSD. I’ve never had much fun using cygwin.
- Most programs look and behave the same way. This is not a big deal, but most applications in OSX use the same shortcut keys and look more or less the same. One notable exception is MS Office, which I don’t use in OSX (I use iWork). In Windows, there is not the same level of consistency.
- The command key. The command key has one purpose: to make shortcut keys like open, save, close, etc. The control key is left alone for its original purposes: sending control characters. Alt and shift are used to modify the command key and navigate text using the keyboard by word, line, page, document, etc. These keys just work better in OSX. This is the most irritating thing about using Windows for me. I recently found out that the standard Windows shortcut keys were copied from Apple. That’s dandy, I just wish that IBM copied the extra key, too.
- The shortcut keys get even worse when you use an Apple keyboard. Command is remapped to the useless Windows key, and control is in an awkward spot.
I don’t use Windows anymore when I can help it. But there is one piece of software I still need in Windows: SolidWorks. Since all I need in Windows is SolidWorks and a browser, items 1-3 don’t matter at all. I fixed number 4 and 5.
There is a free program called Autohotkey that uses a simple scripting to remap keys and replace text in Windows. Many people use it to remap the command key from the Windows key to the more useful control key. I did that, and then immediately wanted to go farther to get my alt-arrow-key navigation and alt-delete functionality back, like in my previous post about Terminal.app. Then I added some more lines to add command-w and command-q remaps. There were also a couple of Windows key commands I decided to keep.
The scripting language is easy and well-documented, so I will simply paste my script below:
;Autohotkey script
;John Walker, 2010-11-25
;http://www.inertreactants.com
;Feel free to reuse, edit and redistribute
;Key remaps for Apple users using boot camp
;(with an Apple notebook or Keyboard)
;following section remaps alt-delete keys to mimic OSX
;command-delete deletes whole line
#BS::Send {LShift down}{Home}{LShift Up}{Del}
;alt-function-delete deletes next word
!Delete::Send {LShift down}{LCtrl down}{Right}{LShift Up}{Lctrl up}{Del}
;alt-delete deletes previous word
!BS::Send {LShift down}{LCtrl down}{Left}{LShift Up}{Lctrl up}{Del}
;following section mimics command-q and command-w
;behaviour to close windows
;note these had to be disabled below for the
;command to ctrl key remaps
#w::^F4
#q::!F4
;following section remaps alt-arrow and command-arrow
;keys to mimic OSX behaviour
#Up::Send {Lctrl down}{Home}{Lctrl up}
#Down::Send {Lctrl down}{End}{Lctrl up}
#Left::Send {Home}
#Right::Send {End}
!Up::Send {Home}
!Down::Send {End}
!Left::^Left
!Right::^Right
;following section remaps command key to control key
;affects all number and letter keys
;note that some keys, like winkey-l and winkey-d
;need to be remapped a differeny way
;otherwise autohotkey will not take over
#a::^a
#b::^b
#c::^c
#d::^d
#e::^e
;following won't remap using the normal method
#f::Send {LCtrl down}{f}{LCtrl up}
#g::^g
#h::^h
#i::^i
#j::^j
#k::^k
;#l::Send {LCtrl down}{l}{LCtrl up} ;disabled, I like winkey-L
#m::^m
#n::^n
#o::^o
#p::^p
;#q::^q ;disabled --remapped to alt-F4 instead
#r::^r
#s::^s
#t::^t
#u::^u
#v::^v
;#w::^w ;disabled --remapped to ctrl-F4 instead
#x::^x
#y::^y
#z::^z
#1::^1
#2::^2
#3::^3
#4::^4
#5::^5
#6::^6
#7::^7
#8::^8
#9::^9
#0::^0
Arrow Key Navigation in OSX Terminal
In almost everywhere in OSX, option-arrow keys and command-arrow keys can be used to navigate around text. I use these constantly, and over time I’ve come to prefer laptop-style keyboards over full size ones with home, pgdn, etc. keys.
command-left/right: moves cursor to start/end of line (equivalent to “home”)
command-up/down: moves cursor to start/end of text in a document
command-delete: delete line
option-left/right: moves cursor backward/forward by one word
option-up/down: moves cursor to backward/forward by one line
option-delete: delete previous word
fn-option-delete: delete next word
Unfortunately, these shortcuts don’t work in Terminal.app. The normal bash shortcuts alt-b and alt-f don’t work either. There is no way to bind the command key because it is used for window management. I’ve come up with satisfactory bindings to move the cursor around in the terminal.
You set the bindings by going to Terminal preferences > settings >keyboard.
Hit the “+” button and bind the strings below to keys. The strings are emacs commands, which bash recognizes (\033 means “escape”).
| Description | Keybind | Emacs Key | String |
| cursor forward one word | option-right | esc,f | \033f |
| cursor back one word | option-left | esc,b | \033b |
| delete previous word | option-delete | * | * |
| delete next word | option-forwarddelete | esc,d | \033d |
| cursor to start of line | option-up | ctrl-a | \001 |
| cursor to end of line | option-down | ctrl-e | \005 |
*You can’t bind the delete (backspace) key in Terminal.app, but if you select the “use option as meta key”, then option-delete will delete the previous word.
I’ve exported my options, so you can also just import my settings from this file.
