• You are not logged in.
  • Index
  • Technical
  • Dreymar's EPKL - tasks for the numpad keys on extend layers

    Dreymar's EPKL - tasks for the numpad keys on extend layers

    • Started by FreqAm
    • 3 Replies:
    • Reputation: 0
    • Registered: 19-Mar-2023
    • Posts: 4

    Since I use the numpad keys to write letters on the default and Shift layer, I plan to write numbers with the extend layer of the numpad keys.

    My attempts to give the numpad keys different tasks on the Extend layer by editing _eD_Extend.ini did not change the output from the default, however.

    I first tried the formatting of the rest of the file:
    Co_P_4 = t
    Co_P_5 = e
    Co_P_6 = s
    Co_P_7 = t

    and then afterwards tried if scan code would work:
    sc04b = t
    sc04c = e
    sc04d = s

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

    You used the wrong syntax, it should be `CoP_4 = ` etc. But that didn't work for me either, just yet.

    The reason is that the NumPad keys aren't mapped by EPKL. To work with Extend, as explained in the documentation, a key must be mapped. To remedy this, you can use mappings in your EPKL_Layouts_Override.ini file that go like this:

    CoP_4 = System

    I guess I should add a block of those in the Layouts_Default file? Unfortunately, it gets difficult as when I tried that the output didn't respect NumLock state anymore! NumPad4 sent NumPadLeft when EPKL was active. You could probably map the scan code to the NumPad4 VK, but then the NumPad wouldn't respect the NumLock Off state instead.

    Mapping those keys by scan code is a complicated idea, as they have different VK codes depending on the NumLock state. I haven't tried anything like what you're doing, so I haven't encountered problems like this before.

    Last edited by DreymaR (20-Mar-2023 10:52:11)

    *** 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: 19-Mar-2023
    • Posts: 4

    Thanks for correcting the syntax!

    DreymaR said:

    I guess I should add a block of those in the Layouts_Default file?

    Yes, that would be great!

    I'm okay with only being able to send one out of NumPad4 or NumPadLeft.
    Actually, I eventually hope to use the num lock key to toggle extend lock instead of num lock, (see https://forum.colemak.com/post/24937/#p24937 )
    Even if toggling don't become possible, much usefulness will come out of having many different layers / states on the numpad.


    45 (NumLock)
    47 (Keypad-7/Home), 
    48 (Keypad-8/Up), 
    49 (Keypad-9/PgUp)
    4a (Keypad--)
    4b (Keypad-4/Left), 
    4c (Keypad-5), 
    4d (Keypad-6/Right), 
    4e (Keypad-+)
    4f (Keypad-1/End),
    50 (Keypad-2/Down), 
    51 (Keypad-3/PgDn)
    52 (Keypad-0/Ins),
    53 (Keypad-./Del)
    (Keypad Enter seem to share 1c with normal enter)
    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    It's in the latest commit already. The mappings are commented out because they're weird, so remove the trailing semicolons. And the default is a System mapping which will give the other key codes as mentioned, so use the second sets of VKey mappings to get the Number keys (only).

    E.g., make this line:

    ;QWP_4 = System  							; NUMPAD4 	VKey    	; SC04b: KP 4

    ...look like this:

    QWP_4 = NUMPAD4 	VKey    	; SC04b: KP 4

    To get that kind of toggle out of the NumLock key, you'd have to do some pretty advanced source code editing. I can't help you with that at the moment, I'm afraid.

    Last edited by DreymaR (23-Mar-2023 11:09:04)

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

    Offline
    • 0
      • Index
      • Technical
      • Dreymar's EPKL - tasks for the numpad keys on extend layers