Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am using a British IBM model M keyboard with Mountain Lion. I have selected the "British - PC" input source and it is working well, except for one key: the pipe.

If you consider what is printed on the key-caps to be correct then the keyboard is mapped correctly, but there is one difference to what my muscle-memory expects and how the keyboard works in Linux.

The key with the "¦" symbol (a "broken pipe"?) on it lies immediately to the right of the left-shift key. I am used to getting a "|" symbol (the "pipe") if I use this key with the "Shift" key.

The key with the "|" symbol is the one immediately to the left of the number 1 key. It emits a "|" symbol when used with the "Alt" key.

Now, I would like to press the key immediately to the right of the left-shift key (marked "¦") and to get a pipe "|" output when used with the "Shift" key.

I have tried using the OSX "symbol and text substitution" feature and this works, except it does not work in the terminal (which is the only place I really need to use this symbol).

So, how can I change the keyboard mapping so that the "¦" key emits a "|" character ?

share|improve this question
    
If you are actually using the British - PC input source provided by Apple, then the pipe symbol should indeed be located at the key you want. Are you using some other input source with the same name provide by someone else? –  TomG Oct 8 '13 at 18:26
    
as far as I know I am using the "British - PC" input source provided by Apple. –  starfry Oct 9 '13 at 22:11
    
I think you need a special layout. See if any of those at this site help: liyang.hu/osx-british.xhtml –  TomG Oct 10 '13 at 4:34

1 Answer 1

Edit: I didn't notice that you were already using the British - PC input source.

You can flip the ` and \ keys (§ and ` in the Mac British keyboard layout) by using a private.xml like this with KeyRemap4MacBook:

<?xml version="1.0"?>
<root>
  <item>
    <name>test</name>
    <identifier>test</identifier>
    <autogen>__KeyToKey__ KeyCode::BACKQUOTE, KeyCode::UK_SECTION</autogen>
    <autogen>__KeyToKey__ KeyCode::UK_SECTION, KeyCode::BACKQUOTE</autogen>
  </item>
</root>
share|improve this answer
    
Didn't he say that he had already selected the British - PC layout? –  TomG Oct 8 '13 at 16:50
    
I'll have a look at this. Is there not a native way to do this (i.e. without installing another app) ? –  starfry Oct 9 '13 at 22:14
    
@starfry You could also create a custom keylayout file. –  ؘؘؘؘ Oct 10 '13 at 13:30
    
@Lauri -- how is it possible that the British Model M does not obey the Apple British-PC keylayout regardless of what is printed on the keys. Does it return non-standard codes? –  TomG Oct 10 '13 at 23:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.