Remapping the cursor keys in MSKLC?

Sorting it all Out
Michael Kaplan's random stuff of dubious value
Be sure to read the disclaimer here first!

Remapping the cursor keys in MSKLC?

  • Comments 2

Maxwell asks:

For years now, I have used a program (originally based on someone else's, but with very little of their code any more) to remap the control keys to cursor keys: ^K is the up arrow, ^H is the left arrow, etc., and ^Q sets a toggle so that ^K is shift-up arrow, etc. (until it gets another ^Q, or ^C or etc.). There's lots of other nasty stuff, like the first ^A is Home, a second ^A (with no intervening keystrokes) brings you to the top of the screen, and a third to the top of the file (this is modeled after what <HOME> did in the old 'brief' editor). My fingers know all these things, and it's painful if I have to do without this remapper.

This program operates by hooking the keyboard msgs using SetWindowsHookEx(WH_KEYBOARD, ...), then translating the control keys. For various reasons, it would be better if it were a standard Keyboard Layout. But I don't know how to build one of those from scratch. I was hoping your Ms Keyboard Layout Creator would let me do that, but so far as I can tell it only allows you to define keys as outputting Unicode characters. Very nice, but not what I want...

I don't suppose that modifying the Layout Creator to allow one to specify e.g. VK_DOWN in the output is going to happen any time soon, right? If not, can you point me to a better way to do what I'm doing than hooking the keyboard msgs? Thanks!

There isn't a happy answer to this question -- it is roughly the same as the answer to the question answered in the post Why doesn't MSKLC have a numeric keypad?

And the reasoning is roughly the same -- that this is not really a language feature. So it really was not in the mandate that put together MSKLC.

Certainly this is a scenario which (like the numeric keypad) can perhaps be considered in some future release. Though it may be a hard sell for all of the reasons given in that other post.

I don't know of specific better soloutions myself, but people have talked about key mappers in the past. Perhaps someone has a suggestion?

 

This post brought to you by (U+21d1, a.k.a. UPWARDS DOUBLE ARROW)

Comment on the blather
Leave a Comment
  • Please add 2 and 7 and type the answer here:
  • Post
Blog - Comment List

  • Olivier asks:

    I have a keyboard that has some extra keys not present in the default keyboard layout...
  • Presumed regular reader and extraregular (ref: ordinary vs. extraordinary to understand extraregular

Page 1 of 1 (2 items)