• You are not logged in.

    UK (united kingdom) keyboard

    • Started by onestop
    • 7 Replies:
    • Reputation: 0
    • From: Bristol, UK
    • Registered: 08-May-2007
    • Posts: 12

    I have a United Kingdom MS Windows keyboard, which has a few differences from the US keyboard. See e.g.
    <https://en.wikipedia.org/wiki/British_a … _keyboards>

    The number and letter keys work fine with either the Colemak Windows layout or the AutoHotKey script, but some of the symbols get switched from those shown on my key labels - quite a few of them with the Colemak Windows layout, only two keys (' # unshifted, @~ shifted) with AutoHotKey. I thought i'd be able to fix AutoHotKey by editing the script Colemak.ahk, but i can't see how to do this as I can't see what's causing the problem - I can't spot anything obvious in the script that would affect these keys. At present I can't type # or ~ without suspending AutoHotKey, which is irritating, while to get ' or @ i need to remember to press the key next door.

    I'd be grateful for any ideas for fixing either the Colemak Windows layout or the AutoHotKey script to work better with a UK keyboard, but particularly AutoHotKey as i don't have admin privileges on all the PCs I use.

    Setting US QWERTY as the current layout before using AutoHotKey won't work as the UK keyboard differs physically from the US one, e.g. it has one more key.

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,364

    I won't discuss the Win layout (it'd be easily fixable with MS Keyboard Layout Creator 1.4, working from the UK or UK International layout), since that won't help you enough it seems.

    The AHK thing is strange. I tried to reproduce something akin to your problem on my Norwegian board (which is somewhat different) but couldn't. Interestingly however, I didn't get the 'o' to work, but only got the ';' instead! This is similar to your problem. It may be caused by the keyboard's scan codes; they are a bit strange in that area (my board has a VK_OEM_# key there).

    I suggest that you try deleting all script lines that map a character onto itself as those are superfluous and may cause trouble (I'm thinking of the '::' line in particular). This should have no bearing on the '@' char though, as that isn't mapped.

    The AHK program isn't bugfree so maybe you found a strange one? Are you sure you use the latest version of AHK? Doesn't look like there's anything relevant in the latest versions, but you never know.

    Try adding #NoEnv to the top of your script, just on an odd chance it may have some kind of impact. I'm suspicious of the '@' char since it's used as a command char by AHK. (I've had a bitch of a time trying to get AHK to take notice of COMMA and PERIOD presses for instance.)

    How about remapping the four offending symbols to where you want them to be? The switch between ' and # should be an easy one, while the problem with @ and ~ might be solvable by using a mapping line like +`'::~ in your script then?

    These are just random suggestions; I'm afraid I can't do much better since I couldn't reproduce your problem.

    Last edited by DreymaR (08-May-2007 13:49:57)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • From: Bristol, UK
    • Registered: 08-May-2007
    • Posts: 12

    Many thanks for your swift and thorough response DreymaR. Deleting all the script lines that map a character onto itself did the trick. All the symbols are now on their labelled keys (with the exception of ; and : of course).

    Might I tentatively suggest that this change could be made in the Colemak.ahk script that is part of the Windows download?? Then you could amend the remarks in <https://colemak.com/AutoHotKey> (and the script's header comments) about requiring the US layout --  i'll admit now that these came very close to putting me off trying Colemak in the first place.

    Just in case it's of use to anyone else, the resulting AutoHotKey script is below, minus the header comments:

    #InstallKeybdHook
    e::f
    r::p
    t::g
    y::j
    u::l
    i::u
    o::y
    p::`;

    s::r
    d::s
    f::t
    g::d
    j::n
    k::e
    l::i
    `;::o

    n::k

    Capslock::Backspace

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,364

    I would suggest the same improvement to the script, or at the very least commenting the redundant lines out with the ';' char.

    I believe that the original remark regarding US keyboards was made because Shai couldn't take the time and effort to test out alternatives; now that you've acted as a pioneer for the UK one it should be mentioned I feel. Perish the thought that anyone should be put off Colemak over such problems when they are so readily fixable!

    One question arises then: Should we take the time to make and get online a proper UK Windows layout? One idea behind Colemak is to conserve the things that don't have to change including rarely used punctuation, so a UK user should only have to relearn those 18 mappings you list (plus extra AltGr symbols for added functionality as applicable). I guess not everybody in the UK will find AHK their tool of choice?

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • From: Bristol, UK
    • Registered: 08-May-2007
    • Posts: 12

    The UK keyboard does seem to be ubiquitous with PCs sold in the UK and Ireland so a proper UK Windows keyboard layout for Colemak sounds sensible.  I'm not in a position to offer to make such a thing though i'm afraid (I don't have MS .NET for one thing, which the MS layout designer requires).

    Personally I'm only using AutoHotKey as i'm often using PCs where i don't have admin privileges. I do wonder if the Colemak.com website should promote AutoHotKey a bit more, at least as an initial "try-out" method, and make it a bit easier to install - having to download AutoHotKey from a separate site first then find the Colemak .ahk file in a sub-folder of the main Windows zip-file download as at present isn't all that user-friendly. As AutoHotKey scripts can be compiled, in principle all you need to download a single .exe file. Not sure what the licensing implications of that would be though - AutoHotKey website appears to encourage such behaviour (<https://www.autohotkey.com/docs/Scripts.htm#ahk2exe> under Notes says "If you plan to distribute your EXE...") but it's under the Gnu Public Licence which presumably means at minimum you'd need to ensure the user agrees to the GPL before installing.

    I appreciate that AHK doesn't include the multilingual features, but i'd guess that's of interest to a minority?? Less sure why <https://colemak.com/AutoHotKey> says it "might behave erratically sometimes" - i've not found any problems (yet..) but this phrase sounds quite off-putting to the uncommitted.

    Sorry perhaps most of this should be in a separate topic...

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,364

    AHK is a great tool and this site should probably have a better link to it (with an icon button at the least), but downloading it from its own site makes sense logistically and is also slightly more courteous. I agree that the Colemak install could've contained, say, a separate directory with both the AHK script, a shortcut link to the AHK site, a compiled .exe from the AHK script and finally a small README. I'm still in the process of making a hopefully better AHK script though (although it's a bit slow going at the moment), so maybe we could just wait for it to get finished and then see whether Shai will agree to putting that into his install package. It'd likely be better if Shai would just make that AHK directory right away.

    AHK does indeed produce some puzzling results on some systems. It's a work in progress based on another work in eternal progress (AutoIt3), and it always seems to have a few surprises up its sleeve. I see how that may put off the occasional dabbler, but it might be even worse if the dabbler were too trustful of it and then experienced annoying problems?

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Shai
    • Administrator
    • Reputation: 36
    • Registered: 11-Dec-2005
    • Posts: 423

    I've commented out the lines that remap keys to themselves and updated the relevant files. I'm planning to add better support for UK keyboards in the future.

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,364

    Surfing around the forums a bit: Just wanted to link to CShadowRun's UK Colemak topic here - he has a UK layout ready.

    https://forum.colemak.com/viewtopic.php?id=229

    Maybe I'll make an extended one if nobody else do.

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0