• You are not logged in.

'hacked' MSKLC to enable remapping CAPSLOCK

  • Started by screaminglemon
  • 31 Replies:
  • Reputation: 0
  • Registered: 10-Jul-2017
  • Posts: 3

Would you have a way to remap the × on the numeric keyboard from * to ×, and the ÷ there from / to ÷? I work with Windows, and I am familiar with MSKLC, but remapping of “numeric” keys is not foreseen anywhere. Specifically the * and / are available on the main keyboard. Sending them from the num pad seems unnecessary. Thank you and greetings – Fritz

Offline
  • 0
  • tmn
  • New member
  • Reputation: 1
  • Registered: 17-Apr-2017
  • Posts: 4
Fritz said:

Would you have a way to remap the × on the numeric keyboard from * to ×, and the ÷ there from / to ÷?

kbd.h allows you to change scancode to VK mappings, but not VK to character. And .klc parser does not seem to support remapping of those numpad keys (VK_MULTIPLY and VK_DIVIDE).

You would have to save the layout as a .klc file, convert it into C source using kbdutool, make the desired changes to the C source, compile it (the complicated part, but there is a script for it) and finally replace the DLLs in the MSKLC-created installer with the ones you've compiled.

Offline
  • 0
  • Reputation: 0
  • Registered: 10-Jul-2017
  • Posts: 3

Thank you, tmn! Unfortunately this means “no” for me … In the meantime I use MSKLC to give me an × (https://en.wikipedia.org/wiki/Multiplic … r_software) with the main keyboard at top left AltGr^, according to new standard DIN 2137:2012-06 (see https://de.wikipedia.org/wiki/Malzeichen#Tastatur, German), or Alt0215.

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

In my Colemak[eD] layout, AltGr+M (for Multiply) and AltGr+V (for diVide) provide the ×/÷ glyphs. I find that handy.

I'm not sure, but I fear the Calc and other numeric-entry apps might not handle these symbols as well as they do the standard * and / ? If they don't, I feel it'd be a somewhat bad idea to remap the NumPad keys to the typographically correct symbols, as I at least use the NumPad for spreadsheet/calculator entry and the like.

I just tested it with Calculator on Win10, and sure enough it doesn't understand my ÷× symbols at least.

Last edited by DreymaR (13-Jul-2017 17:19:40)

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

Offline
  • 0
  • Reputation: 0
  • Registered: 10-Jul-2017
  • Posts: 3

You are right, playing with Num block × for pure aesthetic reasons is not advisable, as it will confuse all math programs. Perhaps a simple keyboard macro in Word for e.g. Alt+Num* will do the job for texts and basta. – Fritz

Offline
  • 0
  • tmn
  • New member
  • Reputation: 1
  • Registered: 17-Apr-2017
  • Posts: 4
tmn said:

Is there any other tool to convert a .dll layout back into C source?

Turns out, there is an assembler/disassembler for them: https://github.com/grompe/kbdasm

Also there is a trick to simplify compilation from the edited C source. Just mark the files created with "kbdutool -s" as read-only after you modify them and kbdutool will compile modified files (failing to overwrite them). As described here.

Last edited by tmn (18-Feb-2020 20:25:51)
Offline
  • 1
  • Reputation: 2
  • Registered: 22-May-2019
  • Posts: 6

You sir, are a genious :)

(I am commenting both to congratulate you and to save this post on my personal list because I have been searching for it for the past hour)

Offline
  • 0