• You are not logged in.

DreymaR's Big Bag of Keyboard Tricks - PKL/Windows Edition!

  • Started by DreymaR
  • 155 Replies:
  • Reputation: 2
  • Registered: 27-Sep-2017
  • Posts: 20

Hey DreymaR, awesome job here!

I've been fighting with PKL for 2 months and was going to withdraw. I was trying to use the extend mode but PKL works very strange and its difficult to debug it. Yesterday I tryed one last time and found this amazing thread (yeah, I only knew about the ancient PKL's autohotkey forum). So, I'm finally going to create my own extend layer :D For that purpose I could, finally, make a complete and (I think) correct list of all scancodes as read by PKL. Here it is, so you can put it in your repo or where you want to help others. It's useful for creating both [layout] and [extend] blocks in layout.ini and pkl.ini.

SC001 =  ; Escape
SC03b =  ; F1
SC03c =  ; F2
SC03d =  ; F3
SC03e =  ; F4
SC03f =  ; F5
SC040 =  ; F6
SC041 =  ; F7
SC042 =  ; F8
SC043 =  ; F9
SC044 =  ; F10
SC057 =  ; F11
SC058 =  ; F12
SC137 =  ; Print Screen
SC054 =  ; SysReq
SC046 =  ; Scroll Lock
SC045 =  ; Pause
SC145 =  ; Break
SC029 =  ; US QWERTY `~
SC002 =  ; US QWERTY 1!
SC003 =  ; US QWERTY 2@
SC004 =  ; US QWERTY 3#
SC005 =  ; US QWERTY 4$
SC006 =  ; US QWERTY 5%
SC007 =  ; US QWERTY 6^
SC008 =  ; US QWERTY 7&
SC009 =  ; US QWERTY 8*
SC00a =  ; US QWERTY 9(
SC00b =  ; US QWERTY 0)
SC00c =  ; US QWERTY -_
SC00d =  ; US QWERTY =+
SC00e =  ; Backspace
SC00f =  ; Tab
SC010 =  ; US QWERTY qQ
SC011 =  ; US QWERTY wW
SC012 =  ; US QWERTY eE
SC013 =  ; US QWERTY rR
SC014 =  ; US QWERTY tT
SC015 =  ; US QWERTY yY
SC016 =  ; US QWERTY uU
SC017 =  ; US QWERTY iI
SC018 =  ; US QWERTY oO
SC019 =  ; US QWERTY pP
SC01a =  ; US QWERTY [{
SC01b =  ; US QWERTY ]}
SC01c =  ; Enter
SC03A =  ; Caps Lock
SC01e =  ; US QWERTY aA
SC01f =  ; US QWERTY sS
SC020 =  ; US QWERTY dD
SC021 =  ; US QWERTY fF
SC022 =  ; US QWERTY gG
SC023 =  ; US QWERTY hH
SC024 =  ; US QWERTY jJ
SC025 =  ; US QWERTY kK
SC026 =  ; US QWERTY lL
SC027 =  ; US QWERTY ;: (ñÑ)
SC028 =  ; US QWERTY '"
SC02b =  ; US QWERTY \|
SC02a =  ; LShift
SC056 =  ; OEM_102
SC02c =  ; US QWERTY zZ
SC02d =  ; US QWERTY xX
SC02e =  ; US QWERTY cC
SC02f =  ; US QWERTY vV
SC030 =  ; US QWERTY bB
SC031 =  ; US QWERTY nN
SC032 =  ; US QWERTY mM
SC033 =  ; US QWERTY ,<
SC034 =  ; US QWERTY .>
SC035 =  ; US QWERTY /?
SC036 =  ; RShift
SC01d =  ; LControl
SC15b =  ; LWin
SC038 =  ; LAlt
SC039 =  ; Space
SC138 =  ; RAlt
SC15d =  ; Context menu
SC11d =  ; RControl
SC152 =  ; Insert
SC153 =  ; Del
SC147 =  ; Home
SC14f =  ; End
SC149 =  ; Page up
SC151 =  ; Page down
SC148 =  ; Up arrow
SC14b =  ; Left arrow
SC150 =  ; Down arrow
SC14d =  ; Right arrow
SC052 =  ; Num0
SC04f =  ; Num1
SC050 =  ; Num2
SC051 =  ; Num3
SC04b =  ; Num4
SC04c =  ; Num5
SC04d =  ; Num6
SC047 =  ; Num7
SC048 =  ; Num8
SC049 =  ; Num9
SC145 =  ; NumLock
SC035 =  ; Num /
SC037 =  ; Num *
SC04a =  ; Num -
SC04e =  ; Num +
SC053 =  ; Num decimal
SC15e =  ; Power
SC15f =  ; Sleep
SC163 =  ; Wake

I've tested most of the keys so I hope all of them are correct.

Last edited by Eraicos (27-Sep-2017 20:36:49)
Offline
  • 1
  • Reputation: 214
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,361

Oo, thanks! Yes, that's nice, and maybe you should post that list over at the AHK forum while you're at it. They need a more sensible documentation of that iirc.

I don't think you need to mark Tab, Backspace, OEM_102 etc as "US QWERTY". ;-)

But what'd be really really nice(!) would be if you could add to it the Virtual Key codes for ANSI and ISO boards (they differ only on the VK_OEM# keys such as semicolon).  Because while there are a few handy scan code lists on the net already, it's very scanty and confusing indeed on the matter of VK codes. Think you're up to that? ;-)

These aren't too instructive, are they:
https://msdn.microsoft.com/en-us/library/ms927178.aspx
https://msdn.microsoft.com/en-us/librar … s.85).aspx

I'll be happy to add this to my repo, yes. Again, nice work.

Something like this would be awesome:

; ==================================================
;  SC      VK_ANSI     VK_ISO      KeyName
; ==================================================
;
; ======== Top row =================================
SC001 =  ; ESCAPE      ESCAPE      Escape
SC03b =  ; F1          F1          F1
SC03c =  ; F2          F2          F2
...
SC046 =  ; SCROLL      SCROLL      Scroll Lock
SC045 =  ; PAUSE       PAUSE       Pause
SC145 =  ; CANCEL      CANCEL      (Ctrl)Break
; ======== Number row ==============================
SC029 =  ; OEM_3       OEM_5       US QWERTY `~
SC002 =  ; 1           1           US QWERTY 1!
SC003 =  ; 2           2           US QWERTY 2@
...

In the setups I've used lately, Power/Sleep/Wake belongs at the end of the top row. I haven't found any VK codes for Power nor Wake though...

Last edited by DreymaR (27-Sep-2017 13:03:23)

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

Offline
  • 0
  • Reputation: 2
  • Registered: 27-Sep-2017
  • Posts: 20
DreymaR said:

I don't think you need to mark Tab, Backspace, OEM_102 etc as "US QWERTY". ;-)

I've corrected those typos.

Regarding the OEM differences between ISO and ANSI... I didn't find anything about that. Personally, I doubt that US QWERTY `~ is OEM_3 in ANSI and OEM_5 in ISO since OEM_5 is the \| key, which is above the Enter key in ANSI and at its left in ISO. Furthermore, virtual codes are a OS thing, it's strange that a key in the same position is interpreted by Windows as OEM_3 or OEM_5 depending on the keyboard. Anyway, even if those differences are real, I think that they are not important.

To find the VK correspondence I found this web which is quite good and complete: http://www.kbdedit.com/manual/low_level_vk_list.html

Offline
  • 0
  • Reputation: 2
  • Registered: 27-Sep-2017
  • Posts: 20

I forgot to say that there is only one thread about PKL in autohotkey's forum and its closed. I've tried to post there but it's not possible.

Ok, I was going really crazy with all the extend nonsense and madness.

ANTI-MADNESS NOTE: On the layout.ini, after VirtualKey ALLWAYS PUT A TABULATION. On the pkl.ini. DON'T PUT COMMENTS AT THE END OF THE LINE (e.g. "SCxxx = CapsLock" instead of "SCxxx = CapsLock ;*devil-ish comment* ")

You don't know what I was doing to "make it work" because of those "errors". Your code seemed super simple and mine was like a hell because of those "details".

Offline
  • 0
  • Reputation: 2
  • Registered: 27-Sep-2017
  • Posts: 20

Little thing, how do you do to make extended Ctrl not sticky? When I press 'CapsLock + F (QWERTY)' and release, in my layout, the control keeps pressed but in yours it doesn't.

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

Regarding the OEM differences between ISO and ANSI... I didn't find anything about that. Personally, I doubt that US QWERTY `~ is OEM_3 in ANSI and OEM_5 in ISO since OEM_5 is the \| key, which is above the Enter key in ANSI and at its left in ISO. Furthermore, virtual codes are a OS thing, it's strange that a key in the same position is interpreted by Windows as OEM_3 or OEM_5 depending on the keyboard. Anyway, even if those differences are real, I think that they are not important.

To find the VK correspondence I found this web which is quite good and complete: http://www.kbdedit.com/manual/low_level_vk_list.html

Sadly, the VK differences are real, important and as you say, completely stupid and way too obscure. Yes, VK_OEM_5 is the \| key... on ANSI boards. On ISO boards, not so much. There, it's the ~` key (or whatever the locale layout has on the tilde key). The \| key is VK_OEM_2 for ISO, which is the name of the /? key for ANSI, etc etc.

VK codes do matter, because some applications use them. People who didn't remap their VK codes correctly experience oddness with hotkeys etc. On the other hand, this may be exploited if you wish to move a key somewhere and keep its shortcuts somewhere else (e.g., typing Colemak with QWERTY shortcuts in many apps) – but at your peril.

Your good and "complete" reference to VK codes, therefore, is incomplete albeit indeed good for ANSI users. And yes, the OS has to sort these codes out depending on the keyboard type. There are other OEM sets for some vendor specific keys and for Japanese etc keyboards. Sad but true.

Eraicos said:

Little thing, how do you do to make extended Ctrl not sticky? When I press 'CapsLock + F (QWERTY)' and release, in my layout, the control keeps pressed but in yours it doesn't.

No idea why my Ext-Ctrl works and yours doesn't. You must've done something differently? As you've noticed, even whitespace details matter.

Last edited by DreymaR (28-Sep-2017 09:17:07)

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

Offline
  • 0
  • Reputation: 2
  • Registered: 27-Sep-2017
  • Posts: 20

OK, you've convinced me (and I found in one of your ini files all the VK differences) so I made a full SC <=> VK list as you said. All blanks in the table mean that those variables don't exist or I didn't find them anywhere, except for the AutoHotkey name of "normal keys" (letters, punctuation and symbols), which I didn't search for.

So, here is the list, if you see any error comment it:

; =====================================================================
;  SC      VK_X (ANSI)  VK_X (ISO)  AutoHotkey Name     KeyName
; =====================================================================
;
; ======== Top row ====================================================
SC001 =  ; ESCAPE       ESCAPE      Escape (or Esc)     Escape
SC03b =  ; F1           F1          F1                  F1
SC03c =  ; F2           F2          F2                  F2
SC03d =  ; F3           F3          F3                  F3
SC03e =  ; F4           F4          F4                  F4
SC03f =  ; F5           F5          F5                  F5
SC040 =  ; F6           F6          F6                  F6
SC041 =  ; F7           F7          F7                  F7
SC042 =  ; F8           F8          F8                  F8
SC043 =  ; F9           F9          F9                  F9
SC044 =  ; F10          F10         F10                 F10
SC057 =  ; F11          F11         F11                 F11
SC058 =  ; F12          F12         F12                 F12
SC137 =  ; SNAPSHOT     SNAPSHOT    PrintScreen         Print Screen
SC054 =  ;                                              System Request
SC046 =  ; SCROLL       SCROLL      ScrollLock          Scroll Lock
SC045 =  ; PAUSE        PAUSE       Pause               Pause
SC145 =  ; CANCEL       CANCEL      CtrlBreak           Break
SC15e =  ;                                              Power
SC15f =  ;                          Sleep               Sleep
SC163 =  ;                                              Wake
; =====================================================================
;
; ======== Number row =================================================
SC029 =  ; OEM_3        OEM_5                           US QWERTY `~
SC002 =  ; KEY_1        KEY_1                           US QWERTY 1!
SC003 =  ; KEY_2        KEY_2                           US QWERTY 2@
SC004 =  ; KEY_3        KEY_3                           US QWERTY 3#
SC005 =  ; KEY_4        KEY_4                           US QWERTY 4$
SC006 =  ; KEY_5        KEY_5                           US QWERTY 5%
SC007 =  ; KEY_6        KEY_6                           US QWERTY 6^
SC008 =  ; KEY_7        KEY_7                           US QWERTY 7&
SC009 =  ; KEY_8        KEY_8                           US QWERTY 8*
SC00a =  ; KEY_9        KEY_9                           US QWERTY 9(
SC00b =  ; KEY_0        KEY_0                           US QWERTY 0)
SC00c =  ; OEM_MINUS    OEM_PLUS                        US QWERTY -_
SC00d =  ; OEM_PLUS     OEM_4                           US QWERTY =+
SC00e =  ; BACK         BACK        Backspace (or BS)   Backspace
; =====================================================================
;
; ======== Top letter row =============================================
SC00f =  ; TAB          TAB         Tab                 Tab
SC010 =  ; KEY_Q        KEY_Q                           US QWERTY qQ
SC011 =  ; KEY_W        KEY_W                           US QWERTY wW
SC012 =  ; KEY_E        KEY_E                           US QWERTY eE
SC013 =  ; KEY_R        KEY_R                           US QWERTY rR
SC014 =  ; KEY_T        KEY_T                           US QWERTY tT
SC015 =  ; KEY_Y        KEY_Y                           US QWERTY yY
SC016 =  ; KEY_U        KEY_U                           US QWERTY uU
SC017 =  ; KEY_I        KEY_I                           US QWERTY iI
SC018 =  ; KEY_O        KEY_O                           US QWERTY oO
SC019 =  ; KEY_P        KEY_P                           US QWERTY pP
SC01a =  ; OEM_4        OEM_6                           US QWERTY [{
SC01b =  ; OEM_6        OEM_1                           US QWERTY ]}
; =====================================================================
;
; ======== Middle letter row ==========================================
SC03A =  ; CAPITAL      CAPITAL     CapsLock            Caps Lock
SC01e =  ; KEY_A        KEY_A                           US QWERTY aA
SC01f =  ; KEY_S        KEY_S                           US QWERTY sS
SC020 =  ; KEY_D        KEY_D                           US QWERTY dD
SC021 =  ; KEY_F        KEY_F                           US QWERTY fF
SC022 =  ; KEY_G        KEY_G                           US QWERTY gG
SC023 =  ; KEY_H        KEY_H                           US QWERTY hH
SC024 =  ; KEY_J        KEY_J                           US QWERTY jJ
SC025 =  ; KEY_K        KEY_K                           US QWERTY kK
SC026 =  ; KEY_L        KEY_L                           US QWERTY lL
SC027 =  ; OEM_1        OEM_3                           US QWERTY ;:
SC028 =  ; OEM_7        OEM_7                           US QWERTY '"
SC02b =  ; OEM_5        OEM_2                           US QWERTY \|
SC01c =  ; RETURN       RETURN      Enter (or Return)   Enter
; =====================================================================
;
; ======== Bottom letter row ==========================================
SC02a =  ; LSHIFT       LSHIFT      LShift              Left Shift
SC056 =  ;              OEM_102                         OEM_102
SC02c =  ; KEY_Z        KEY_Z                           US QWERTY zZ
SC02d =  ; KEY_X        KEY_X                           US QWERTY xX
SC02e =  ; KEY_C        KEY_C                           US QWERTY cC
SC02f =  ; KEY_V        KEY_V                           US QWERTY vV
SC030 =  ; KEY_B        KEY_B                           US QWERTY bB
SC031 =  ; KEY_N        KEY_N                           US QWERTY nN
SC032 =  ; KEY_M        KEY_M                           US QWERTY mM
SC033 =  ; OEM_COMMA    OEM_COMMA                       US QWERTY ,<
SC034 =  ; OEM_PERIOD   OEM_PERIOD                      US QWERTY .>
SC035 =  ; OEM_2        OEM_MINUS                       US QWERTY /?
SC036 =  ; RSHIFT       RSHIFT      RShift              Right Shift
; =====================================================================
;
; ======== Bottom row =================================================
SC01d =  ; LCONTROL     LCONTROL    LControl (or LCtrl) Left Control
SC15b =  ; LWIN         LWIN        LWin                Left Win
SC038 =  ; LMenu        LMenu       LAlt                Left Alt
SC039 =  ; SPACE        SPACE       Space               Space
SC138 =  ; RMenu        RMenu       RAlt                Right Alt
SC15d =  ; APPS         APPS        AppsKey             Context menu
SC11d =  ; RCONTROL     RCONTROL    RControl (or RCtrl) Right Control
; =====================================================================
;
; ======== Cursor Control =============================================
SC152 =  ; INSERT       INSERT      Insert (or Ins)     Insert
SC153 =  ; DELETE       DELETE      Delete (or Del)     Del
SC147 =  ; HOME         HOME        Home                Home
SC14f =  ; END          END         End                 End
SC149 =  ; PRIOR        PRIOR       PgUp                Page up
SC151 =  ; NEXT         NEXT        PgDn                Page down
SC148 =  ; UP           UP          Up                  Up arrow
SC14b =  ; LEFT         LEFT        Left                Left arrow
SC150 =  ; DOWN         DOWN        Down                Down arrow
SC14d =  ; RIGHT        RIGHT       Right               Right arrow
; =====================================================================
;
; ======== Numeric pad ================================================
SC052 =  ; NUMPAD0      NUMPAD0     Numpad0             Num0
SC04f =  ; NUMPAD1      NUMPAD1     Numpad1             Num1
SC050 =  ; NUMPAD2      NUMPAD2     Numpad2             Num2
SC051 =  ; NUMPAD3      NUMPAD3     Numpad3             Num3
SC04b =  ; NUMPAD4      NUMPAD4     Numpad4             Num4
SC04c =  ; NUMPAD5      NUMPAD5     Numpad5             Num5
SC04d =  ; NUMPAD6      NUMPAD6     Numpad6             Num6
SC047 =  ; NUMPAD7      NUMPAD7     Numpad7             Num7
SC048 =  ; NUMPAD8      NUMPAD8     Numpad8             Num8
SC049 =  ; NUMPAD9      NUMPAD9     Numpad9             Num9
SC145 =  ; NUMLOCK      NUMLOCK     NumLock             NumLock
SC035 =  ; DIVIDE       DIVIDE      NumpadDiv           Num /
SC037 =  ; MULTIPLY     MULTIPLY    NumpadMult          Num *
SC04a =  ; SUBTRACT     SUBTRACT    NumpadSub           Num -
SC04e =  ; ADD          ADD         NumpadAdd           Num +
SC053 =  ; DECIMAL      DECIMAL     NumpadDot           Num decimal
SC11c =  ; ENTER        ENTER       NumpadEnter         Num enter
Last edited by Eraicos (28-Sep-2017 14:43:34)
Offline
  • 1
  • Reputation: 2
  • Registered: 27-Sep-2017
  • Posts: 20

Is there some way to debug and see what happens when some key doesn't work? My Ext-SC035 misteriously doesn't work and I've checked all checkable things. To create a custom layout is a hell D:

Last edited by Eraicos (28-Sep-2017 16:02:13)
Offline
  • 0
  • Reputation: 2
  • Registered: 27-Sep-2017
  • Posts: 20

Two new details and I thilk I've finished my layout:
1: Inside the [extend] block all keys without value (e.g. "SC02d = ") MUST be commented.
2: In the [layout] block the CapsLock scan code MUST be "CapsLock" instead of "SC03A". That was the reason for which my Ext-Ctrl produced a sticky Control.

Offline
  • 0
  • Reputation: 2
  • Registered: 27-Sep-2017
  • Posts: 20

I know I'm being a little annoying but how did you do those layout images? They are really cool and the PKL's perl script doesn't work with "VirtualKey".

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

Thanks for your efforts and insights!

My layout images are my own design using InkScape. I've put a lot of work into them as you can see! My long-term plan is to script them so I can generate a help image from a layout file, but I'm not anywhere near there yet.

Last edited by DreymaR (29-Sep-2017 13:59:31)

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

Offline
  • 0
  • Reputation: 117
  • From: UK
  • Registered: 14-Apr-2014
  • Posts: 978
DreymaR said:

My long-term plan is to script them so I can generate a help image from a layout file, but I'm not anywhere near there yet.

I have some code that generates images from layout files, which I use to generate the images on my Mod-DH pages.
It probably doesn't meet all your requirements, but might be adaptable if I ever get around to putting it on github.
Do you have background images for the individual keys?

Using Colemak-DH with Seniply.

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

I'm going to use separate background images, so people can choose coloured/plain, fancy/simple or whatever style key caps they want. Then the letters will be transparently added on top of that in a separate image. I've succeeded in doing this with my PKL_eD for v0.3, and I'm working on v0.4 code now.

No, I haven't worked with the keys separately so far but with full keyboard images. I think that's easier.

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

Offline
  • 0
  • Reputation: 2
  • Registered: 27-Sep-2017
  • Posts: 20
DreymaR said:

I'm going to use separate background images, so people can choose coloured/plain, fancy/simple or whatever style key caps they want. Then the letters will be transparently added on top of that in a separate image. I've succeeded in doing this with my PKL_eD for v0.3, and I'm working on v0.4 code now.

If it works for version 0.3 could you share the code, please? I would like to try it.

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

The background image thing is in my GitHub files PKL now. There's a commit with the 0.3(r85) code, and another with 0.4beta. If you compile either of my codes, they'll allow a DreymaR_layout.ini file to specify the background image separately.

But the current help images all have key caps on them, instead of transparency. So they won't work with this functionality – yet.

Last edited by DreymaR (01-Oct-2017 18:32:17)

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

Offline
  • 1
  • Reputation: 0
  • Registered: 02-Jan-2014
  • Posts: 11

Hi,

may I have beginner question?

I'd like to turn left window key into alt-gr. I tried to write

SC15b = RAlt    modifier

which worked only when I use standard windows keyboard layout, which has alt-gr on right alt. On top of that, this still does not block windows shortcuts as win-L. So I remapped left win in sharpkeys, so windows shortcuts are finally dead. But if I switch layout to ENG, left win does not generate alt-gr.

What am I doing wrong? Can you advise? Thanks.

----
EDIT:
weird. following line, is sensitive for keyboard layout used in windows. Symbols: •◦ cannot be typed in ENG layout, but can be in CZ.

SC029 = OEM_3    0    dk1    dk2    --    •    ◦    ; QWERTY `~

while following lines:
SC004 = 3    0    š    #    --    3    --    ; QWERTY 3#
SC005 = 4    0    č    $    --    4    --    ; QWERTY 4$
SC006 = 5    0    ř    %    --    5    --    ; QWERTY 5%
SC01f = S    1    s    S    --    *{Left}    --    ; QWERTY sS
SC020 = D    1    d    D    --    *{Down}    --    ; QWERTY dD

produces works (for alt-gr combinations) irrelevantly of underlying keyboard layout...

Last edited by alfonz19 (04-Oct-2017 14:17:04)
Offline
  • 0
  • Reputation: 214
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,361

Greetings, padawan! ^_^

This may be due to some PKL/AHK peculiarities.
- Make sure you use tabulator characters to delimit entries in layout.ini. Do not use spaces!
- Make sure the layout.ini you're writing Unicode in uses UTF-8 (or UTF-16?) encoding. The CZ layout probably has this, but ENG probably not.
- To achieve this, use a proper editor such as NotePad++.

Last edited by DreymaR (04-Oct-2017 15:37:14)

*** 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: 02-Jan-2014
  • Posts: 11

Thanks for help.

* I'm using +- tabs. I tried to kill *all* spaces altogether including " = " but that did not help at all, so I put it back.
* Written using IntellijIDEA, which handles encoding 100% correctly.
* I noticed, that row with numbers has issues. Numbers are fine with alt-gr, but ~, - and = are sick. All row is sick for alt-gr -shift.  Also space; this can handle alt-gr, but alt-gr-shift is sick.

* I also noticed, that while idea works fine, for example notepad when pressed altgr it also behaves as alt. Menu entries are flashing when I press alt-gr, and if that press is not followed by any key, it opens the menu.

---
If you know what else could cause that, please share. I'm (sadly) on windows 10. But most of the layout works as expected, but I'm far from "ready for suicide" state.

layout

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

Windows 10 is great! I use BASH on Ubuntu on it, I'm having a great time! ;-)

Well, so it looks as if you're doing it right but in fact you must be doing something wrong. Right? ;-)

If you've remapped something in SharpKeys, it's remapped for all purposes. Registry level remapping is the lowest level of the system; so PKL, the OS etc etc will all see the resulting key map. If you've disabled LAlt there, it won't come back for another layout if that's what you wanted.

What you should do, is start with something that works. Like the CZ layout, and then copy that file and change only what you need there and see if it still works.

Note one thing: In layout.ini there's an entry like this:

shiftstates = 0:1:2:6:7

If this string doesn't contain 6 and 7, the layout doesn't use the AltGr and Shift+AltGr shift states.

I haven't tried to remap AltGr but there may well be problems with it. Modifier modness is not always pleasant...

Last edited by DreymaR (06-Oct-2017 10:31:16)

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

Offline
  • 0
  • Reputation: 15
  • Registered: 12-Sep-2016
  • Posts: 45

In my experience, it is very hard to remap AltGr or Windows keys on Windows. AltGr is kind of Control+Alt, but it also depends on the keyboard layout. The best you can do is indeed remap like

SC15b = RAlt modifier

This works when the system keyboard layout has AltGr. I haven't found a way to remap AltGr if the system layout doesn't have AltGr.

Furthermore, Windows has some special combinations which can't be remapped, including Win+L and Control+Alt+Delete. Those can only be circumvented by low level remapping. So, you could try to swap LWin with RAlt via a low level way.

Create advanced keyboard layouts in various formats using my Keyboard Layout Files Creator!

Offline
  • 0
  • Reputation: 0
  • Registered: 02-Jan-2014
  • Posts: 11
39aldo39 said:

In my experience, it is very hard to remap AltGr or Windows keys on Windows. AltGr is kind of Control+Alt, but it also depends on the keyboard layout. The best you can do is indeed remap like

SC15b = RAlt modifier

This works when the system keyboard layout has AltGr. I haven't found a way to remap AltGr if the system layout doesn't have AltGr.

Furthermore, Windows has some special combinations which can't be remapped, including Win+L and Control+Alt+Delete. Those can only be circumvented by low level remapping. So, you could try to swap LWin with RAlt via a low level way.

ohó, so bizarre, got even more bizarre. In provided layout and in sharpkeys (because layout definition seemed not to work) I remap lwin to ralt. Main benefit of doing that is, that all windows shortcuts are in hell now, where they belong. BUT! If I use ENG layout, and press windows-[sdfe] which are mapped as altgr combination to do cursor movement, it works!, while windows+[space-=´] etc combination, which should produce (based on altgr mappings in layout) symbols ~—≠• and shifted ≈±◦, it does not work. Long story short, with ENG layout I have duality window key equal and unequal-to altgr at the same time.

But using layout with altgr like CZE, window key is always altgr, which is relief.

DreymaR said:

Windows 10 is great! I use BASH on Ubuntu on it, I'm having a great time! ;-)

I'm happy for you (figuratively speaking), but I cannot stand them. For me all OS sucks somewhere, but inability to control and define in windows what my PC does , should do or when it should do that, drives me crazy. Plus the UI is from other dimension — I'm constantly googling, where some control is, and for half of  settings I have to click: something-> advanced->some bullshit->advanced->really->something->advanced... And some really hard settings[sarcasm] like: no sounds(you can set it, by some apps disobeys), no microsoft defined shortcuts(you can turn them off in group policy, but windows disobeys for half of them), numlock ALWAYS on, please!(you can set it in regedit using some bizarre codes, but windows disobeys after a while in 1/x cases) — they are just impossible.

I've been on linux probably way too long, so coming back to windows is not easy at all. Not saying that linux does not suck, it suck big time, but for me, it suck less.

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

If the layout doesn't have AltGr, PKL has an option to interpret Alt+Ctrl as AltGr. This will mess up any Alt+Ctrl+key shortcuts though. Proper form is specifically LAlt+RCtrl, but I don't think PKL is that specific. Farkas put it in there mostly to help laptop users that didn't have a proper AltGr key on their keyboards.

Yes, Windows can be arcane and although Linux is at least as arcane at least it's more open about it. But in the later Windows, some things have gotten better. Bash on Ubuntu on Windows works well for me now! And if I want, say, Locale Settings I don't really have to google anymore but I press the Win/GUI key and type in 'locale' pretty much like in Ubuntu! Sure, then I get four different suggestions as there seems to be multiple settings apps now... but at least it's fairly easy to find this way. ^_^

Keep in mind that any OS with which you're not familiar is hell. For me, that's MacOS. I suppose it can be good, but for me it isn't now.

Last edited by DreymaR (07-Oct-2017 12:14:14)

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

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

Note that there's some potential trouble with the Windows 10 Fall Creators Update and PKL_eD.exe. You've been warned.

It's a case of a false positive detection from the security software Windows Defender, I'm pretty sure about that. Working on it.

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

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

Actually, there's a lot of updates happening. Keep an ear to the GitHub ground if you're interested. But I thought I'd mention that not only have I made an Image Generator which allows creation of help images for the current layout and ergo mod configuration, but I've put it to good use and implemented a bunch of locale layouts! You'll find them in the Layouts\Colemak-eD folder.

They're for the most part only premade with the CurlAngleWide mod (Colemak-ⲔⲰ[eD]) as making every possible combo of mods and variants would be super brutal! It should be fairly easy to tweak them by editing a bit in the layout.ini file under the [eD_info] section. If you want to make another ergo mod variant the best option would be to copy-paste and rename the directory to reflect your change. Then it'd still be selectable the usual way from PKL_Settings.ini.

To make help images yourself you'll need a copy of Inkscape. Otherwise, ask for help. ^_^

*** 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: 15-Dec-2018
  • Posts: 3

Hi DreymaR, I love the windows utility. Is there an option to use tap Caps Lock for backspace and hold for Extend? I am able to use the Layer-Tap function with QMK but was wondering if there is a similar functionality for non-QMK keyboards. Thanks.

Last edited by ecdf (15-Dec-2018 04:40:59)
Offline
  • 0