Archive

Archive for the ‘Apple’ Category

KeyRemap4MacBook for a Microsoft Natural Keyboard 4000

February 18th, 2013 Comments off

Do you use a Apple Mac Book Pro at work? If you do, then, and if you like to use Microsoft Natural Keyboard for your day job then you might have found that Microsoft and Apple devices do not quite play well together. Some of the most important programming keys are mapped to strange characters.

Luckily enough, the on the keyboard’s Windows Logo key  is mapped to the Apple Alt key; and the keyboard’s Alt key is mapped to the Apple Command key. So it is not so bad on first use. You can also download the IntelliSense drivers from Microsoft for Apple OS X 10.7 and 10.8 and those help in remapping the Apple Command and Alt keys; fortunately the defaults just worked for me. The Number Lock key does not work at all and there is currently no way to fix this.

The biggest concern was the mapping of the double quotes, ampersand, tilde, back quotes and back slash characters. Because I develop software for a living, this reduced my productivity because they keys were mapped to different keys. I, then, found out about a popular tool called KeyRemap4MacBook. Using this program and help from Takayama Fumihiko, the developer/maintainer of KeyRemap4MacBook, eventually gave me exactly what needed.

Remapping Microsoft Natural Keyboard for Mac OS 10.8 here is the file:


<?xml version="1.0"?>
<!--
 ======================================================================
 Mac OS 10.8
 KeyRemap4MacBook for a Microsoft Natural Keyboard 4000
 United Kingdom Layout
 By Peter Pilgrim 12th February 2013
 peter dot pilgrim at gmail dot com

http://xenonique.co.uk

 ======================================================================
-->
<root>
 <!--

http://stackoverflow.com/questions/3202629/where-can-i-find-a-list-of-mac-virtual-key-codes

 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h

https://github.com/tekezo/KeyRemap4MacBook/blob/version_8.0.0/src/bridge/generator/keycode/data/KeyCode.data

 -->
 <symbol_map type="KeyCode" name="AMPERSAND" value="0x13" />
 <symbol_map type="KeyCode" name="DOUBLE_QUOTE" value="0x27" />
 <symbol_map type="KeyCode" name="BACK_SLASH_and_PIPE" value="0x2a" />
 <symbol_map type="KeyCode" name="SECTION_SIGN_and_PLUS_MINUS" value="0x0a" />
 <symbol_map type="KeyCode" name="BACK_TICK_and_TILDE" value="0x32" />

<symbol_map type="KeyCode" name="HASH" value="0x14" />

<item>
 <name>Micro Natural Keyboard - Swap Ampersand and Double Quote</name>
 <identifier>private.ampersand_and_doublequote</identifier>
 <autogen>
 --KeyToKey--
 KeyCode::AMPERSAND, ModifierFlag::SHIFT_L | ModifierFlag::NONE,
 KeyCode::DOUBLE_QUOTE, ModifierFlag::SHIFT_L,
 </autogen>
 <autogen>
 --KeyToKey--
 KeyCode::DOUBLE_QUOTE, ModifierFlag::SHIFT_L | ModifierFlag::NONE,
 KeyCode::AMPERSAND, ModifierFlag::SHIFT_L,
 </autogen>
 </item>
 <item>
 <name>Micro Natural Keyboard - Reconfigure Hash and Tilde key</name>
 <identifier>private.hash_and_tidle</identifier>
 <autogen>
 --KeyToKey--
 KeyCode::BACK_SLASH_and_PIPE, ModifierFlag::NONE,
 KeyCode::HASH, ModifierFlag::OPTION_L,
 </autogen>
 <autogen>
 --KeyToKey--
 KeyCode::BACK_SLASH_and_PIPE, ModifierFlag::SHIFT_L | ModifierFlag::NONE,
 KeyCode::BACK_TICK_and_TILDE, ModifierFlag::SHIFT_L,
 </autogen>
 </item>
 <item>
 <name>Micro Natural Keyboard - Reconfigure Backtick and Pipe key</name>
 <identifier>private.backslash_and_pipe</identifier>
 <autogen>
 --KeyToKey--
 KeyCode::SECTION_SIGN_and_PLUS_MINUS, ModifierFlag::NONE,
 KeyCode::BACK_SLASH_and_PIPE, ModifierFlag::NONE,
 </autogen>
 <autogen>
 --KeyToKey--
 KeyCode::SECTION_SIGN_and_PLUS_MINUS, ModifierFlag::SHIFT_L | ModifierFlag::NONE,
 KeyCode::BACK_SLASH_and_PIPE, ModifierFlag::SHIFT_L,
 </autogen>
 </item>
 <item>
 <name>Micro Natural Keyboard - Reconfigure Just Grave Key to Section Sign Key</name>
 <identifier>private.backtick_and_just_grave_key</identifier>
 <autogen>
 --KeyToKey--
 KeyCode::BACK_TICK_and_TILDE, ModifierFlag::NONE | ModifierFlag::SHIFT_L,
 KeyCode::SECTION_SIGN_and_PLUS_MINUS, ModifierFlag::NONE ,
 </autogen>
 </item>
</root>

Basic syntax for customising KeyRemap4MacBook. Now Natural Keyboard developers on Apple Mac Book Pro can be productive again.

Have fun!

+PP+

Categories: Administration, Apple, Software Tags:

Building OpenJFX 2.2 Again

October 31st, 2012 Comments off

Here is how I build the OpenJFX 2.2 on both Mac OS X, because the semi-official Getting Started instructions on the OpenJFX site are a bit of out-of-date.

Find a folder for your project, create a folder:-

mkdir -p ~/open-jfx-2.2

cd ~/open-jfx-2.2

Using Mercurial, clone the project folder from the Master change-set:

hg clone http://hg.openjdk.java.net/openjfx/2.2/master

cd master

Copy the existing JavaFX runtime JAR into a special folder. I am using JavaFX bundled in Oracle Java SE 7 update 9. We create the folder structure and copy the JAR into it.

mkdir -p artifacts/sdk/rt/lib

cp ${JAVA_HOME}/jre/lib/jfxrt.jar artifacts/sdk/rt/lib

ls -l artifacts/sdk/rt/lib
[/code]

Now clone the RT sub tree using the Mercurial

hg clone http://hg.openjdk.java.net/openjfx/2.2/master/rt

cd rt

Edit the properties file common.properties, and modify the debuggable property near the top of the file (e.g. linenumber 15 or so)

# COMMENTED OUT: javac.debuglevel=${jfx.javac.debuglevel}
#javac.debuglevel=none
javac.debuglevel=lines,vars,source

Now we can clean the distribution:-

ant clean

Afterwards, we should be able to compile and build JAR for the existing distribution.

ant dist

Look inside the dist folder for the results

peterpilgrim@Peters-MBPRD.local [686] > ls -l dist
total 6888
-rw-r--r--  1 peterpilgrim  staff  3523332 30 Oct 11:54 openjfxrt.jar
peterpilgrim@Peters-MBPRD.local [687] > 

+PP+

Categories: Apple, Development, JavaFX Tags:

Steve Jobs, a Genius in Thought Leadership and Creative Product Visionary

October 6th, 2011 2 comments

 

stevejobs

 

One of the greatest technology leaders that ever lived and probably ever walk this earth. RIP Steve Jobs, Apple Chairman and former CEO http://www.apple.com/stevejobs/ ( Applause ;-D *)

Hewlett Packard –> Atari –> Apple –> Next –> Pixar –> Next –> Apple

 

Quotes From Commencement Speech at Reed College

 

“Sorry to be so dramatic: but your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma — which is living with the results of other people’s thinking

“Most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.”

“Stay Hungry. Stay Foolish.”

“Be insanely great.”

 

How Steve Influenced My University Days

 

It was now a time ago, in the late 1980’s when I attended London South Bank University. Whilst reading my the later half of my Science Computing degree, I wrote many assignments on an expensive colour Apple Macintosh IIgs computer in the, then, very dignified department only, computer lab. Especially, I loved the black and white user interface of Macintosh. It was a light years ahead of the MS DOS based IBM PC compatibles of the time. The tool of choice was WordPerfect, a proper word processing application. In those heady days, Apple Mac computers were prone to viruses and infections, and hackers even then, which meant that the administrative department gave out special 3.5 disks with a Disinfectant program.

The experience of the earlier Mac user interface, Windows Icon Mouse Pointer, borrowed from the seminal research of Xerox PARC in Palo Alto, lead to my early interest in user interface programming. If Steve Jobs had not gone for perfection, pushing his knowledge of art design, calligraphy, his philosophy, I never would have viewed this technology at university. The first impressions of a beautiful user interface, graphically proportioned and in colour for the day, left me great thoughts about a career in programming graphics and software development.

Those first impressions of quality business application with graphic user interface were not lost on me.  It lead to a job programming years later in the 1990s, on SunOS 4.1 workstations and X Windows / OSF Motif programming. Although, I never got to develop HyperCard applications ( I had no interest in that technology and there was too much work to be done on other bachelor degree assignments), the inspiration of the user interface, the slickness of the user experience left me wanting more. I took some of these inspirations also to Borland Turbo Pascal programming on MS DOS as part of the final project of my degree.  

About the time of my finals, I think in 1989 or 1990, I read two biographies one was about Bill Gates and other was about Steve Jobs. I borrowed both books from the South Bank University library. I am very sure that the latter was called The Journey is the Reward, which was published in 1987 and written by Jeffrey S. Young. It was a fascinating read and really engrossing story of Steve Jobs’ earlier career. I remember the chapter called Lobotomy, where he was ousted from the computer company that he had co-founded in 1976. On the day that he was chucked out, I think Wozniak and some other staff members were worried about his state of health and mental stability, and they cared enough. They made sure that he was ok. Steve Jobs lived quite frugally, in fact, walked bare feet in his earlier life, and lived on his own, in a big house in the valley. They need not have worried, because Steve Jobs, was never ever going to top himself. He dusted his self off, over a couple of months, and then founded NeXT computers, and helped John Lasseter create Pixar Animations.

Reading that the story of never-say-die in 1989/1990, being adventurous, being a hippie, and traveling to India, and then watching and reading to his commencement speech at Reed College in 2005, yesterday, I definitely felt touched, and inspired today and back then.  Especially right now, today, as I reflect on the “down” periods of my life. It made me say, “So bloody what! If these other people do not understand me now. It is more important that I understand myself.” That was the core message that should never be buried, lost in the ether, a lost signal in random white noise, or be enveloped by other people’s agendas. Steve Job’s core message deserves be sticky.

Stay true to your own goals, because you only have one life. Ever. And it is a precious one. One.

 

Miscellany

 

New story UK on the BBC Link

*In Italian Football, at sports ground, traditionally the fans clap instead of stay silent in order to show a mark of respect. I like this.

Watch the CNN tribute to Steve Jobs on YouTube

Business Insider published 13 most memorable quotes from Steve Jobs

The iPhone Dev Team [a group of international socially responsible hackers] who unlocked and jail broke the firmware for iPhone in various generations 1G,3G,3GS put a simple tribute on their blog

(spelling and grammar *PP*)