Author Topic: Mapping F17 as Windows Key  (Read 2826 times)

0 Members and 1 Guest are viewing this topic.

Offline ibu

  • Thread Starter
  • Posts: 82
Mapping F17 as Windows Key
« on: Fri, 08 January 2010, 04:45:06 »
My Cherry G80-5000 does not have a Windows Key.

But it has - at the left side - a column of the keys F13-F17.

In the docu of the keyboard it is said, that F17 emulates Shift+F7. That works.

I like to use F17 like a Windows Key.

My first try was a mapping with Autohotkey:
+F7::Send {Shift Up}{LWin}

But:
When I press F17 the startmenue appears. But it should not appear until you release the F17 key.
Because - of course - I want to use all standard key combinations like "WIN+E" or "WIN+R" etc.

At the moment that is not possible.

Do you know a solution?

Further I tried the following tools
MKLC
SharpKeys
RemapKeys

Without success. The do not show the F13-F17, nor do they offer a mapping on a combination like "SHIFT+F7".

Thanks for your help.

I'm looking forward to the Miniguru, which offers a nice mapping tool and a nice mapping saving technology: saving on the firmware.
Great.
Main keyboard: Apple Wireless Keyboard A1255
Main keyboard of the last years: Cherry G80-3000 LQMDE; Fujitsu KBPC-E (Ergo), with some texture, without a bottom, without an optical 5cm trackball in the middle (see pic)
Actually needed for cannibalization: an old KBPC-E to get an intact left mat. The one in my KBPC-E is broken.
Shortly but not longer used: Ergodex DX1 input system, Cherry G80-1851 LPMDE, Cherry G80-5000 HAADE Ergo, IBM Modell M 1391403

Offline DreymaR

  • Posts: 277
Mapping F17 as Windows Key
« Reply #1 on: Fri, 08 January 2010, 06:13:03 »
How odd to not send the F17 code (the codes F13-F24 are implemented) instead of some jiggery pokery Shift+F7?! Be that as it may, here's a solution that ought to see you through:

Code: [Select]
+F7::Send {LWin Down}
+F7 Up::Send {Lwin Up}


If you find it necessary, send {Shift Up} like in your example as well.

What this won't do is let you use Shift+Win, Ctrl+Win and such combinations. Not sure if you need any. You could of course map, say Ctrl+Shift+F7 (!+F7) specifically to a modified LWin if you need to.

For the other keys you have there, maybe you could have fun sending some of these:

Code: [Select]
Browser_Back
Browser_Forward
Browser_Refresh
Browser_Stop
Browser_Search
Browser_Favorites
Browser_Home
Volume_Mute
Volume_Down
Volume_Up
Media_Next
Media_Prev
Media_Stop
Media_Play_Pause
Launch_Mail
Launch_Media
Launch_App1
Launch_App2
« Last Edit: Fri, 08 January 2010, 06:20:32 by DreymaR »
Better burden you cannot carry than man-wisdom much -- Hávamál

Offline ocdonkb

  • Posts: 149
Mapping F17 as Windows Key
« Reply #2 on: Fri, 08 January 2010, 13:15:20 »
I've been using KeyTweak for getting Windows key on older keyboards. Give that a try.
| Filco Brown 87 key | Realforce 87U | Unicomp Spacesaver | IBM Model M | Cherry ML4100 | Dell AT101W | Focus 2001 |

Offline ibu

  • Thread Starter
  • Posts: 82
Mapping F17 as Windows Key
« Reply #3 on: Sat, 09 January 2010, 06:26:29 »
Quote from: DreymaR;149089

Code: [Select]
+F7::Send {LWin Down}
+F7 Up::Send {Lwin Up}
With that code pressing or pressing-releasing my F17 key has no effect at all.

With
Code: [Select]
+F7::Send {Shift Up}{LWin Down}
+F7 Up::Send {Shift Up}{Lwin Up}
I have the same effect as with the code in the first posting:

Combinations like "WIN+E" are impossible, because pressing F17 functions like pressing-releasing the Win key on a keyboard with win key.
Quote from: DreymaR;149089
What this won't do is let you use Shift+Win, Ctrl+Win and such combinations. Not sure if you need any. You could of course map, say Ctrl+Shift+F7 (!+F7) specifically to a modified LWin if you need to.
At the moment I do not need such combinations.

But I need combinations like
WIN (pressed and holded) and
arrow key left
arrow key right
Enter
Home
etc.

My goal is, that I do not have to manipulate or add something to a mapping file, when I decide to add a new hotkey of that type of combination (WIN plus non meta key (shift, ctrl).
« Last Edit: Sat, 09 January 2010, 15:47:13 by ibu »
Main keyboard: Apple Wireless Keyboard A1255
Main keyboard of the last years: Cherry G80-3000 LQMDE; Fujitsu KBPC-E (Ergo), with some texture, without a bottom, without an optical 5cm trackball in the middle (see pic)
Actually needed for cannibalization: an old KBPC-E to get an intact left mat. The one in my KBPC-E is broken.
Shortly but not longer used: Ergodex DX1 input system, Cherry G80-1851 LPMDE, Cherry G80-5000 HAADE Ergo, IBM Modell M 1391403

Offline ibu

  • Thread Starter
  • Posts: 82
Mapping F17 as Windows Key
« Reply #4 on: Sat, 09 January 2010, 06:41:19 »
Quote from: ocdonkb;149236
I've been using KeyTweak for getting Windows key on older keyboards. Give that a try.
I installed the tool.
First, I deactivated the Autohotkey entries.

Then I pressed F17 in the dialog "HalfTeachMode" of KeyTweak.
Result: Scancode 57435
I mapped it to "left Windows key".
Please see:


Effect when I press F17: none at all.

Quite complicated stuff that remapping :(

It looks like, that KeyTweak could not deal with the combination "SHIFT+F7" but only with single Keys like F7.

But I need to remap a "combination" to a single key.
« Last Edit: Sat, 09 January 2010, 06:47:33 by ibu »
Main keyboard: Apple Wireless Keyboard A1255
Main keyboard of the last years: Cherry G80-3000 LQMDE; Fujitsu KBPC-E (Ergo), with some texture, without a bottom, without an optical 5cm trackball in the middle (see pic)
Actually needed for cannibalization: an old KBPC-E to get an intact left mat. The one in my KBPC-E is broken.
Shortly but not longer used: Ergodex DX1 input system, Cherry G80-1851 LPMDE, Cherry G80-5000 HAADE Ergo, IBM Modell M 1391403

Offline ibu

  • Thread Starter
  • Posts: 82
Mapping F17 as Windows Key
« Reply #5 on: Mon, 11 January 2010, 01:46:07 »
Does really nobody has an another idea to solve the task?
Main keyboard: Apple Wireless Keyboard A1255
Main keyboard of the last years: Cherry G80-3000 LQMDE; Fujitsu KBPC-E (Ergo), with some texture, without a bottom, without an optical 5cm trackball in the middle (see pic)
Actually needed for cannibalization: an old KBPC-E to get an intact left mat. The one in my KBPC-E is broken.
Shortly but not longer used: Ergodex DX1 input system, Cherry G80-1851 LPMDE, Cherry G80-5000 HAADE Ergo, IBM Modell M 1391403

Offline DreymaR

  • Posts: 277
Mapping F17 as Windows Key
« Reply #6 on: Mon, 11 January 2010, 03:29:39 »
My guess, then, is that your keyboard sends some lame-ass key combos instead of correctly emulating a key press.

Thus, releasing the F17 key doesn't send a key release as it should maybe?

However, could you try replacing the second line with:

*F7 Up:: Send {LWin Up}

On the other hand, if pressing and holding down the F17 key opens the Win menu before you release the key then the second line isn't the problem here.

'Scan code 54735' sounds like the scan code was reported in decimal which is highly unconventional and fills me with horror. In hex that's E0 5B which isn't the code for shift-F7 at all but ... *drum roll* ... the scan code for LWin!!! So now what, you remapped the key already (but it still isn't working right) and then remapped the LWin key to itself?! Better check out your registry or something by now.

If you want a clean remap section, run the following script by making it a .reg file and running that:
Code: [Select]
REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
; The next line maps RWin <- CapsLock <- BackSpace
;&quot;Scancode Map&quot;=hex:00,00,00,00,00,00,00,00,03,00,00,00,0e,00,3a,00,3a,00,5c,e0,00,00,00,00
; The next line remaps only CapsLock <- BackSpace
;&quot;Scancode Map&quot;=hex:00,00,00,00,00,00,00,00,02,00,00,00,0e,00,3a,00,00,00,00,00
; The next line removes all scancode remappings
&quot;Scancode Map&quot;=-

[HKEY_CURRENT_USER\Keyboard Layout]
&quot;Scancode Map&quot;=-

; Numbers are LittleEndian (0x12345678 -> 78,56,34,12)
; ---------------------------------------------------------------------
; Bytes       Meaning
; ---------------------------------------------------------------------
; 00 00 00 00 Version info (usually zero)
; 00 00 00 00 Flags (usually zero)
; 03 00 00 00 # of entries (# of mappings +1 for the terminator)
; 0e 00 3a 00 The CapsLock(3a) key now sends a BackSpace(0e) scancode
; 3a 00 5c e0 The RWin(e05c)   key now sends a CapsLock(3a)  scancode
; 00 00 00 00 Null terminator (always zero)


I suppose that KeyTweak can clean things up too.

Better yet, run regedit and browse to the keys mentioned in the script (both the LM and CU ones!) to see what's there before you change anything.
Better burden you cannot carry than man-wisdom much -- Hávamál

Offline sixty

  • Posts: 1855
    • http://deskthority.net
Mapping F17 as Windows Key
« Reply #7 on: Mon, 11 January 2010, 08:34:24 »
Some keyboards indeed send Shift+F1-10 instead of F11-F20. The Boscom/Unicomp Terminal emulator keyboard does this too. I also tried remapping it to single keys without much success. Since the keyboard indeed sends Shift+F7 you will not be able to remap it based on scancodes with KeyTweak and so on.

IF its possible to begin with, then probably only with Autohotkey. One problem I see here (logically speaking) is that when the keyboard sends Shift+F7 and you remap that combination to send + of your choice, would that in the end generate ++ or possibly even +++ since your shift modifier is sent on hardware level?