views:

107

answers:

3

I'm running Mac OSX on a MacBookPro (UK keyboard). I run windows XP under parallels in a VM. I run Visual Studio .Net 2003 and 2008 in XP in the VM when i need to. I have English United Kingdom and English United states keyboards setup in XP. (they switch sometimes for no apparent reason)

There is no hash "#" key on my mac's keyboard. However, in OSX I can get a hash with an alt+3 key combination. But In Windows XP... I can not make a "#" character.

I can go to the character map in windows and copy a hash.. switch into OSX and copy a hash.. search in code and copy a hash.. but I can not make a hash in XP using my keyboard without typing U+0023: ... which you can imagine is annoying.

coding anything with hash symbols is becoming a choir.

Anyone got any advice or key mapping tricks I can use to get hash characters working in XP using my mac UK keyboard?

A: 

Switch your Mac keyboard to US layout, so that you get a # on shift-3 instead of alt-3 (you then get £ using alt-3).

System Preferences => Language & Text => Input Sources

If you enable both British English and US English layouts and enable the input menu then you can quickly and easily switch between the two layouts as needed.

Paul R
Thanks for the tip Paul. Shift+3 when using the US English keyboard works! Problem solved.. I'll just have to think in US English on the UK keyboard.
cpj
@cpj: you soon get used to it - I very rarely switch back to the UK layout, but I guess if you do your own accounts or something like that where you use `£` a lot then you might need to switch back and forth more often.
Paul R
A: 

How do UK programmers code in C without going insane?

Try holding down left-alt while typing 35 on the numeric keypad. It's also shift-3 on the US keyboard. (We happen to call # "pound" also, coincidentally.)

Also, your "random layout switching" may just be due to your keyboard settings. In the Regional Settings or whatever it is, look for something that allows you to define keyboard settings. Usually I clear out the one that implies "switch whenever I hit this fairly common pair of keys." ;)

dash-tom-bang
And this answer is wrong because... ?
dash-tom-bang
I think it's the implied suggestion that anybody can code in C without going insane? (As far as the keyboard goes, though, 99% of UK keyboards do have a # key. The Mac is unusual in this respect.)
brone
huh. oh well. UK keyboards have UKP on shift-3, right? Where's the #?
dash-tom-bang
It's underneath ~, on the 102nd key that US keyboards don't have.The layout is actually rather different from the US one, but when done properly it has all the same chars and a couple of extra ones. (See, e.g., http://en.wikipedia.org/wiki/Keyboard_layout#United_Kingdom) I don't know why they added an extra key rather than reusing \` -- indeed, ASCII 96 was £ when I was young, no such thing as \` back then -- but they did.
brone
A: 

Firstly, to sort out the keyboard layout switching rubbish: go to Control Panel, Regional and Language Options. Visit the Languages tab, and click the "Details..." button. In the Text Services and Input Languages box that pops up, click the Key Settings button near the bottom. Find any action in the list that has a key sequence, highlight it, click the Change Key Sequence... button and switch it off.

As for the keyboard layout, my only suggestion (and it's only a suggestion...) would be to try installing the Boot Camp drivers. These install a "Macbook Pro UK" keyboard layout, separate from the normal US and UK layouts. I just uninstalled this sight unseen -- this Englishman likes his # key, so my Mac has a US keyboard -- but presumably it provides access to the £ symbol, somehow. If you can get this stuff installed then perhaps this keyboard layout will work under Parallels too.

brone