Author Topic: Which keyboards have the best (or programmable) Fn layer?  (Read 10229 times)

0 Members and 1 Guest are viewing this topic.

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Which keyboards have the best (or programmable) Fn layer?
« on: Fri, 02 January 2015, 01:47:18 »
I was looking at some of the smaller form-factor keyboards, and some of them have FN layer layouts that are almost perfect, except one or two things I wish were different. That got me wondering which of the keyboards on the market today have programmable Fn layer (that's stored in the keyboard itself, so I can use the programmed functions even on something like an Android mobile device)?

Also, which keyboards do you think have the best Fn layer? I really like the Fn layout of the MiniGuru, but it's still far from being a product we can buy. I like the Majestouch Manila US67key's Fn layer too, but its spacebar is just a tad too short.

Currently, my small form-factor keyboard is the Leopold FC660C, which I do like, due to its discreet arrow keys and really smart Fn layer of using those arrow keys as Home/End and Page Up/Down. But part of me wishes that its Fn layer allowed the kind of layout that the MiniGuru and Manila has, so my fingers never have to leave home row (which is such an enticing thought to anyone who types a lot).

I know there are software that allow remapping of keys or programming of macros (and BTW, which software is currently the best for that purpose--one that's easy to use and reliable?), but it would be nice if the programming/mapping is store in the keyboard so I can just plug it into any computer or mobile device and still use the mapping/programming.

Offline Oobly

  • * Esteemed Elder
  • Posts: 3929
  • Location: Finland
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #1 on: Fri, 02 January 2015, 04:34:52 »
I quite like the Fn layer of my KBT Pure Limited, but the Poker II would probably suit you better since it has a fully programmable Fn layer.

Also, the GoN NerD60 and Massdrop Infinity are completely programmable, meaning you can change every character / key on every layer, even the Fn key.
Buying more keycaps,
it really hacks my wallet,
but I must have them.

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #2 on: Fri, 02 January 2015, 15:03:07 »
I quite like the Fn layer of my KBT Pure Limited, but the Poker II would probably suit you better since it has a fully programmable Fn layer.

Also, the GoN NerD60 and Massdrop Infinity are completely programmable, meaning you can change every character / key on every layer, even the Fn key.

Thanks for the suggestions.

The KBT Pure's layout is pretty good. I do wish the Fn keys were closer together though (slightly shorter spacebar).

KBC Poker II's programmable layers is great, but the actual positions of the Fn and Pn keys aren't ideal (to me). Placing them at where the thumbs can easily reach while without making the spacebar hard to reach, would be more ideal.

GoN is far too expensive from a utilitarian point-of-view (which is my default outlook when it comes to assessing tools/equipment). As much as I appreciate the artisan element of custom/indie products, I'm not sure I'm willing to spend that much.

The Massdrop Inifinity looks very intriguing. It's a lot more work than just buying a keyboard and programming it, and I really wish they had a version with a shorter spacebar so I can have the Fn keys more comfortably pressed by my thumbs (the ideal placement is right between X and C, and M and, which leaves plenty of room on the spacebar still).

I wonder why no one's tried to place the Fn keys at the positions I described. My hands are pretty standard size, and I'd think I'm not the only one who would want that? I guess sourcing a non-standard spacebar is too cost-prohibitive or difficult?
« Last Edit: Fri, 02 January 2015, 15:43:36 by Lunatique »

Offline spiceBar

  • Posts: 998
    • ChessTiger.com
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #3 on: Fri, 02 January 2015, 18:37:39 »
I quite like the Fn layer of my KBT Pure Limited, but the Poker II would probably suit you better since it has a fully programmable Fn layer.

Also, the GoN NerD60 and Massdrop Infinity are completely programmable, meaning you can change every character / key on every layer, even the Fn key.

Thanks for the suggestions.

The KBT Pure's layout is pretty good. I do wish the Fn keys were closer together though (slightly shorter spacebar).

KBC Poker II's programmable layers is great, but the actual positions of the Fn and Pn keys aren't ideal (to me). Placing them at where the thumbs can easily reach while without making the spacebar hard to reach, would be more ideal.

GoN is far too expensive from a utilitarian point-of-view (which is my default outlook when it comes to assessing tools/equipment). As much as I appreciate the artisan element of custom/indie products, I'm not sure I'm willing to spend that much.

The Massdrop Inifinity looks very intriguing. It's a lot more work than just buying a keyboard and programming it, and I really wish they had a version with a shorter spacebar so I can have the Fn keys more comfortably pressed by my thumbs (the ideal placement is right between X and C, and M and, which leaves plenty of room on the spacebar still).

I wonder why no one's tried to place the Fn keys at the positions I described. My hands are pretty standard size, and I'd think I'm not the only one who would want that? I guess sourcing a non-standard spacebar is too cost-prohibitive or difficult?

I would suggest you have a look at these combinations:

1. A Poker 2 with the GuiFN layout:
  https://geekhack.org/index.php?topic=57723.0

2. If you really don't want to move your hands from the home row at all, you don't even need to add Fn keys around the spacebar:
  https://geekhack.org/index.php?topic=51069.0

I have used both solutions for months, and they are incredibly efficient in term of reducting hands movements.

For solution #2 and Android (for example) you need a fully programmable keyboard. No commercial keyboard will do the job. Or, if you have a PS/2 keyboard (the Poker X is, for example), you can also use Hasu's PS/2->USB converter, which turns any PS/2 keyboard into a fully programmable one. The code for solution #2 is freely available.

Offline ideus

  • * Exalted Elder
  • Posts: 8123
  • Location: In the middle of nowhere.
  • Björkö.
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #4 on: Fri, 02 January 2015, 18:51:33 »
+1 Infinity keyboard, it already has more than fourteen hundred request for a second round. I think in the Infinity the FN position could be programmed also so you can choose any place for it as you wish.

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #5 on: Fri, 02 January 2015, 20:07:41 »

I would suggest you have a look at these combinations:

1. A Poker 2 with the GuiFN layout:
  https://geekhack.org/index.php?topic=57723.0

2. If you really don't want to move your hands from the home row at all, you don't even need to add Fn keys around the spacebar:
  https://geekhack.org/index.php?topic=51069.0

I have used both solutions for months, and they are incredibly efficient in term of reducting hands movements.

For solution #2 and Android (for example) you need a fully programmable keyboard. No commercial keyboard will do the job. Or, if you have a PS/2 keyboard (the Poker X is, for example), you can also use Hasu's PS/2->USB converter, which turns any PS/2 keyboard into a fully programmable one. The code for solution #2 is freely available.

Thanks so much! I've downloaded AutoHotkey and SpaceFN, and I'm really enjoying SpaceFN so far.

Is there an easier way for non-programmers to customize the layout? For example, placing the Home/End at M and , is more comfortable for me, and I'd like to place BackSpace and Delete at O and P. I looked at the help file and it seems AutoHotkey is strictly for people who know how to program? I guess I can learn how do do some customization by studying the examples in the help file, but a WYSIWYG GUI for customizing is far more preferable (similar to some of the customization software that comes with some keyboards and mice).

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #6 on: Fri, 02 January 2015, 20:12:05 »
+1 Infinity keyboard, it already has more than fourteen hundred request for a second round. I think in the Infinity the FN position could be programmed also so you can choose any place for it as you wish.

Yes, but the actual size/position of the keys can't be altered, so there's no way to get the Fn keys pushed further into the spacebar (which is more ideal for me). Putting them between X and C, and M and , would be perfect, but it seems none of the keyboards out there have that arrangement.

Offline spiceBar

  • Posts: 998
    • ChessTiger.com
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #7 on: Sat, 03 January 2015, 00:07:08 »

I would suggest you have a look at these combinations:

1. A Poker 2 with the GuiFN layout:
  https://geekhack.org/index.php?topic=57723.0

2. If you really don't want to move your hands from the home row at all, you don't even need to add Fn keys around the spacebar:
  https://geekhack.org/index.php?topic=51069.0

I have used both solutions for months, and they are incredibly efficient in term of reducting hands movements.

For solution #2 and Android (for example) you need a fully programmable keyboard. No commercial keyboard will do the job. Or, if you have a PS/2 keyboard (the Poker X is, for example), you can also use Hasu's PS/2->USB converter, which turns any PS/2 keyboard into a fully programmable one. The code for solution #2 is freely available.

Thanks so much! I've downloaded AutoHotkey and SpaceFN, and I'm really enjoying SpaceFN so far.

Is there an easier way for non-programmers to customize the layout? For example, placing the Home/End at M and , is more comfortable for me, and I'd like to place BackSpace and Delete at O and P. I looked at the help file and it seems AutoHotkey is strictly for people who know how to program? I guess I can learn how do do some customization by studying the examples in the help file, but a WYSIWYG GUI for customizing is far more preferable (similar to some of the customization software that comes with some keyboards and mice).

There is no GUI for AutoHotKey.

You need to edit the script, and it should not be too hard. Basically, you are going to see the keys that are currently assigned in the text, and you will replace them with other key names of your choice.

I have designed SpaceFN, but not the AutoHotKey script (I do not own any Windows computer).

If you stick with SpaceFN, we can contact the author of the script and ask him for help.

Ultimately, if SpaceFN fits your needs, what you need is either a keyboard with a programmable controller compatible with the TMK firmware (which supports SpaceFN) or a PS/2 compatible keyboard and Hasu's PS/2->USB converter, which will turn the keyboard into a fully programmable one.

But for now maybe you want to spend more time with SpaceFN and make sure it's working for you. Some people have reported that when they type at their full speed SpaceFN sometimes misses the spaces they type. I think it depends on how you type. I have not noticed the problem myself.

Offline Sygaldry

  • Edema Ruh
  • * Esteemed Elder
  • Posts: 1261
  • Location: Chicago
  • All the truth in the world is held in stories.
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #8 on: Sat, 03 January 2015, 00:29:02 »
GON by far is the best in terms of programmability. The key programming GUI is incredibly intuitive and easy to use and the stability of the firmware and controller is unparalleled.

50 or so dollars for the PCB is well worth it and they can be fitted to cheaper casings than what GON offers. Ie: GON 60 PCB will fit in a stock Poker II case which can often be had for free... the GON 87 PCB will fit in any A87 compatible case. Etc.

Not expensive by any means whatsoever unless you want a fancy case and all that
null

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #9 on: Sat, 03 January 2015, 01:59:02 »
There is no GUI for AutoHotKey.

You need to edit the script, and it should not be too hard. Basically, you are going to see the keys that are currently assigned in the text, and you will replace them with other key names of your choice.

I have designed SpaceFN, but not the AutoHotKey script (I do not own any Windows computer).

If you stick with SpaceFN, we can contact the author of the script and ask him for help.

Ultimately, if SpaceFN fits your needs, what you need is either a keyboard with a programmable controller compatible with the TMK firmware (which supports SpaceFN) or a PS/2 compatible keyboard and Hasu's PS/2->USB converter, which will turn the keyboard into a fully programmable one.

But for now maybe you want to spend more time with SpaceFN and make sure it's working for you. Some people have reported that when they type at their full speed SpaceFN sometimes misses the spaces they type. I think it depends on how you type. I have not noticed the problem myself.

I'll test SpaceFN for a few days and see how it fares.

Having the programming stored on the keyboard for use with mobile devices is nice to have, but it's not a deal-breaker in any way, since my Leopold FC660C's layout is quite good already. It's just nice to not have to leave the home row at all when I'm in full-blown immersion while writing. Maybe SpaceFN is all I need (and it's nice to be able to use it with all my keyboards). I do most of my writing at the computer anyway, so my typing experience at my desk is the main priority.

GON by far is the best in terms of programmability. The key programming GUI is incredibly intuitive and easy to use and the stability of the firmware and controller is unparalleled.

50 or so dollars for the PCB is well worth it and they can be fitted to cheaper casings than what GON offers. Ie: GON 60 PCB will fit in a stock Poker II case which can often be had for free... the GON 87 PCB will fit in any A87 compatible case. Etc.

Not expensive by any means whatsoever unless you want a fancy case and all that

I have never done any kind of DIY with the insides of a keyboard before, and I'm not particularly skilled with a soldering iron. Do you have links to good places to get all the parts I would need to put together a complete keyboard using the GoN PCB, as well tutorials that guides a newbie like me through the whole process step-by-stop?

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #10 on: Sat, 03 January 2015, 16:56:17 »
You need to edit the script, and it should not be too hard. Basically, you are going to see the keys that are currently assigned in the text, and you will replace them with other key names of your choice.

I searched for tutorials and the AutoHotkey help file for how to do this, and came up empty. I'm assuming I have to open the spacefn-win.ahk file somehow as a text file inside of AutoHotkey and then edit its content? But I can't figure out how to do that. I'm not the programmer type at all--I'm the artist type who uses WYSIWYG GUI to do all my creative work--so I'm totally helpless with really techie stuff like writing scripts and codes or even using them. I really need some hand-holding on this, and if you have the time to help me out, I'd really appreciate it.

BTW, when I try to double-click spacefn-win.ahk (to try to open it inside of AutoHotkey), I get this message:

"Error at line 9.

lIne Text: {delay
Error: The leftmost character above is illegal in an expression.

The program will exit."

Also, I had a hard time figuring out what to do with the dual-0.6.0 folder once I unzipped it. I tried to throw that entire folder into Lib, but that wasn't it, it seemed. So I took all the contents inside the dual-0.6.0 folder and put them inside the dual folder that's already inside of Lib, and that worked. It would be nice if this was mentioned on the page for the dual download.

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #11 on: Sat, 03 January 2015, 18:37:13 »
I tried opening up the spacefn-win.ahk in WordPad, and edited some stuff to get the mapping I wanted, like so:

Quote
#If options.mode == "ijkl"
*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})

*u::dual.comboKey({F22: "PgUp"})
*m::dual.comboKey({F22: "PgDn"})
*,::dual.comboKey({F22: "Home"})
*.::dual.comboKey({F22: "End"})

*o::dual.comboKey({F22: "Backspace"})
*p::dual.comboKey({F22: "Delete"})

But that didn't work. There must be something I didn't do right--a step I skipped or something. Like I said, I'm not a programmer at all and I'm just making logical guesses based on common sense, and it obviously isn't enough.

Offline ideus

  • * Exalted Elder
  • Posts: 8123
  • Location: In the middle of nowhere.
  • Björkö.
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #12 on: Sat, 03 January 2015, 18:52:20 »
+1 Infinity keyboard, it already has more than fourteen hundred request for a second round. I think in the Infinity the FN position could be programmed also so you can choose any place for it as you wish.

Yes, but the actual size/position of the keys can't be altered, so there's no way to get the Fn keys pushed further into the spacebar (which is more ideal for me). Putting them between X and C, and M and , would be perfect, but it seems none of the keyboards out there have that arrangement.

You will need a custom layout that you should direct wiring, and to fit a teensy or other similar controller to it. However that changed what you stated in your original post, because you originally did say nothing about flexible layouts. I do not know about an available board with an user customizable layout.

Offline spiceBar

  • Posts: 998
    • ChessTiger.com
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #13 on: Sat, 03 January 2015, 20:08:51 »
I tried opening up the spacefn-win.ahk in WordPad, and edited some stuff to get the mapping I wanted, like so:

Quote
#If options.mode == "ijkl"
*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})

*u::dual.comboKey({F22: "PgUp"})
*m::dual.comboKey({F22: "PgDn"})
*,::dual.comboKey({F22: "Home"})
*.::dual.comboKey({F22: "End"})

*o::dual.comboKey({F22: "Backspace"})
*p::dual.comboKey({F22: "Delete"})

But that didn't work. There must be something I didn't do right--a step I skipped or something. Like I said, I'm not a programmer at all and I'm just making logical guesses based on common sense, and it obviously isn't enough.

I would actually advise you against using O and P for Backspace and Delete.

SpaceFN works well when the space key is used to switch between "modes". There are two main modes: typing and navigating.

It is assumed that in each mode you are going to type several keys, because deciding to press and hold space or releasing it has a cost. This cost is negligible if you type more than one key after switching the mode.

Backspace or Delete is often used in very short bursts, generally you type Backspace once for example and you resume typing.

What is going to happen is that very often typing space-O is going to result in you typing a space then a O. Here is why:

For space-O to be interpreted as Backspace, the timing of key presses must be this:

Code: [Select]
space: ----------------
O:            -------

and sometimes (too often) you are going to do this:
Code: [Select]
space: ----------------
O:          ---------------

...which is going to be interpreted as a space followed by a O.

I think that instead of mapping Backspace to space-O you should simply, like on the HHKB, assign Backspace to the "\ |" key, which is easier to reach.

Mapping Home and End to space-M and space-, is OK. Actually, it was my first choice when I designed the SpaceFN layout and for a long time I thought about leaving both space-U/space-O and space-M/space-, work as Home and End. Eventually, as I needed more keys and I wanted to avoid using the left-hand side of the keyboard, I decided to use space-M and space-, for other purposes.
« Last Edit: Sat, 03 January 2015, 20:15:18 by spiceBar »

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #14 on: Sat, 03 January 2015, 21:35:00 »
I would actually advise you against using O and P for Backspace and Delete.

SpaceFN works well when the space key is used to switch between "modes". There are two main modes: typing and navigating.

It is assumed that in each mode you are going to type several keys, because deciding to press and hold space or releasing it has a cost. This cost is negligible if you type more than one key after switching the mode.

Backspace or Delete is often used in very short bursts, generally you type Backspace once for example and you resume typing.

What is going to happen is that very often typing space-O is going to result in you typing a space then a O. Here is why:

For space-O to be interpreted as Backspace, the timing of key presses must be this:

Code: [Select]
space: ----------------
O:            -------

and sometimes (too often) you are going to do this:
Code: [Select]
space: ----------------
O:          ---------------

...which is going to be interpreted as a space followed by a O.

I think that instead of mapping Backspace to space-O you should simply, like on the HHKB, assign Backspace to the "\ |" key, which is easier to reach.

Mapping Home and End to space-M and space-, is OK. Actually, it was my first choice when I designed the SpaceFN layout and for a long time I thought about leaving both space-U/space-O and space-M/space-, work as Home and End. Eventually, as I needed more keys and I wanted to avoid using the left-hand side of the keyboard, I decided to use space-M and space-, for other purposes.

Thanks for the tip. I never was able to the get my customization recognized by AHK/SpaceFN, so I had no way to test if my Backspace and Delete placements would work well. Can you please show me how to customize SpaceFN to get the mapping I want (the actual step-by-step process, as explained to a non-programmer who knows nothing about using custom scripts or how to even load/edit/run a script)? I tried editing spacefn-win.ahk in WordPad but it didn't do anything at all.

Offline spiceBar

  • Posts: 998
    • ChessTiger.com
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #15 on: Sat, 03 January 2015, 22:54:08 »
I would actually advise you against using O and P for Backspace and Delete.

SpaceFN works well when the space key is used to switch between "modes". There are two main modes: typing and navigating.

It is assumed that in each mode you are going to type several keys, because deciding to press and hold space or releasing it has a cost. This cost is negligible if you type more than one key after switching the mode.

Backspace or Delete is often used in very short bursts, generally you type Backspace once for example and you resume typing.

What is going to happen is that very often typing space-O is going to result in you typing a space then a O. Here is why:

For space-O to be interpreted as Backspace, the timing of key presses must be this:

Code: [Select]
space: ----------------
O:            -------

and sometimes (too often) you are going to do this:
Code: [Select]
space: ----------------
O:          ---------------

...which is going to be interpreted as a space followed by a O.

I think that instead of mapping Backspace to space-O you should simply, like on the HHKB, assign Backspace to the "\ |" key, which is easier to reach.

Mapping Home and End to space-M and space-, is OK. Actually, it was my first choice when I designed the SpaceFN layout and for a long time I thought about leaving both space-U/space-O and space-M/space-, work as Home and End. Eventually, as I needed more keys and I wanted to avoid using the left-hand side of the keyboard, I decided to use space-M and space-, for other purposes.

Thanks for the tip. I never was able to the get my customization recognized by AHK/SpaceFN, so I had no way to test if my Backspace and Delete placements would work well. Can you please show me how to customize SpaceFN to get the mapping I want (the actual step-by-step process, as explained to a non-programmer who knows nothing about using custom scripts or how to even load/edit/run a script)? I tried editing spacefn-win.ahk in WordPad but it didn't do anything at all.

I can't help with AHK (sorry about this), but I have sent a PM to the author of the SpaceFN AHK script. Let's see if he can help.

I'm pretty sure anyway that there are plenty of people here who are familiar with AHK, and some good soul is going to help you.

You will get the mapping you want.

Offline lydell

  • Posts: 42
  • Location: Sweden
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #16 on: Sun, 04 January 2015, 01:52:26 »
Is there an easier way for non-programmers to customize the layout?

No, unfortunately not. However, it’s not that hard.

I looked at the help file and it seems AutoHotkey is strictly for people who know how to program?

No, AutoHotkey started out as a really, really simple language that was supposed to be easy to understand and learn. However, since then the language has evolved into more and more of a regular programming language.

The AutoHotkey documentation is splendid, though (at least compared to many other projects I’ve used). It covers everything while still being easy to understand and geared both towards beginners and more experienced people.

You need to edit the script, and it should not be too hard. Basically, you are going to see the keys that are currently assigned in the text, and you will replace them with other key names of your choice.

That’s correct. That’s what you need to do.

I searched for tutorials and the AutoHotkey help file for how to do this, and came up empty.

When I worked with AutoHotkey I always used the online documentation and the forums, which I found to be easier. As far as I remember there’s a tutorial on how to create a .ahk file, edit it and finally run it.

I'm assuming I have to open the spacefn-win.ahk file somehow as a text file

Yes, you need to open it as a text file.

inside of AutoHotkey

No, you should open it with any text editor of choice. If you haven’t installed one the only option is Notepad. (Word won’t work, and I don’t think WordPad works either but I’m not sure.)

BTW, when I try to double-click spacefn-win.ahk (to try to open it inside of AutoHotkey), I get this message:

"Error at line 9.

lIne Text: {delay
Error: The leftmost character above is illegal in an expression.

The program will exit."

Hmm, that’s odd. Are you sure that you have installed AutoHotkey 1.1.13.00+? At least when I installed AutoHotkey (though that’s more than a year ago) there was still an option to download the older “classic” version.


Also, I had a hard time figuring out what to do with the dual-0.6.0 folder once I unzipped it. I tried to throw that entire folder into Lib, but that wasn't it, it seemed. So I took all the contents inside the dual-0.6.0 folder and put them inside the dual folder that's already inside of Lib, and that worked. It would be nice if this was mentioned on the page for the dual download.

Thanks, I’ve mentioned this in the readme now.

I tried opening up the spacefn-win.ahk in WordPad, and edited some stuff to get the mapping I wanted, like so:

Quote
#If options.mode == "ijkl"
*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})

*u::dual.comboKey({F22: "PgUp"})
*m::dual.comboKey({F22: "PgDn"})
*,::dual.comboKey({F22: "Home"})
*.::dual.comboKey({F22: "End"})

*o::dual.comboKey({F22: "Backspace"})
*p::dual.comboKey({F22: "Delete"})

But that didn't work. There must be something I didn't do right--a step I skipped or something. Like I said, I'm not a programmer at all and I'm just making logical guesses based on common sense, and it obviously isn't enough.

That looks correct to me. Perhaps the problem is that you used WordPad. Try Notepad instead (redownload the file first). Oh, and logical guesses based on common sense usually takes you far ;)

Can you please show me how to customize SpaceFN to get the mapping I want (the actual step-by-step process, as explained to a non-programmer who knows nothing about using custom scripts or how to even load/edit/run a script)?

First, make sure that you have the correct version of AutoHotkey installed.

Then, open the spacefn-win.ahk file in Notepad.

Then, make your changes, save the file and double-click it to run it. Repeat until satisfied.

Note, though, that I don’t have a Windows machine to test on anymore and it’s been a while since I actually used AutoHotkey, so I might have forgotten something.

I also recommend spending some time reading some AutoHotkey documentation/tutorials on their website. It’s worth it, and not as hard or boring as it may sound.

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #17 on: Sun, 04 January 2015, 02:26:46 »

First, make sure that you have the correct version of AutoHotkey installed.

Then, open the spacefn-win.ahk file in Notepad.

Then, make your changes, save the file and double-click it to run it. Repeat until satisfied.

Note, though, that I don’t have a Windows machine to test on anymore and it’s been a while since I actually used AutoHotkey, so I might have forgotten something.

I also recommend spending some time reading some AutoHotkey documentation/tutorials on their website. It’s worth it, and not as hard or boring as it may sound.

Thanks for the help.

I did exactly as you described several times, and every time, I get that error message, and I do have the latest version of AHK installed, since I just downloaded it yesterday from the official site. And just to be clear, SpaceFN works perfectly--I have no problem running it from the spacefn-win.exe, and all the hotkeys work exactly as spiceBar had designed them. Even after I edited spacefn-win.ahk with my own mapping and saved the file (which should have overwritten spiceBar's mapping), his mapping still works and mine don't work at all.

At this point, I'm starting to get used to his mapping, so maybe I have no need to change anything anymore, but it's still nice to figure out what went wrong so if I want to make changes to the mapping in the future, I could.

BTW, it is possible to swap the functionality of CapsLock and Left Control with AHK, or is it something that has to be done at the hardware level such as the keyboards with dip-switches in the back?
« Last Edit: Sun, 04 January 2015, 11:15:46 by Lunatique »

Offline lydell

  • Posts: 42
  • Location: Sweden
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #18 on: Sun, 04 January 2015, 03:46:08 »
I do have the latest version of AHK installed, since I just downloaded it yesterday from the official site.

Ah, there we have it. I got interested enough in this now to actually visit autohotkey.com. I immediately noticed that things have changed since I last visited that site. You actually do use the old “classic” version. Please go to http://ahkscript.org/ instead, and download AutoHotkey from there. If you’re confused by all this there’s a really good summary here: http://ahkscript.org/foundation/history.html

BTW, it is possible to swap the functionality of CapsLock and Left Control with AHK, or is it something that has to be done at the hardware level such as the keyboards with dip-switches in the back?

Oh yes, it is possible. I think `Capslock::Ctrl` does the trick.

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #19 on: Sun, 04 January 2015, 18:15:25 »
Okay, after studying the tutorials and lots of trial an error, I've got most of my mapping working. This is what my mapping should look like ideally (using the MiniGuru as the background image, only because it's convenient):
86384-0
(In this context, "S" means Shift, and "C" means Ctrl, since room on each key is limited)

The part that's currently not working, is that although CapsLock now does work as Ctrl, Ctrl does not work as CapsLock.

Also, all the hotkeys that have Shift+Ctrl now only registers the Shift but not the Ctrl. I did have it working for a while but then it stopped working, although I didn't change anything that I know of that would have caused it, so I'm not sure what's wrong. I suspect the *CapsLock::Ctrl bit is causing the problem, but I took that out and the problem remained. Something else must be in conflict that I'm not seeing.

Here's my edited version of the script--maybe you guys can spot what's wrong with it:

Quote
; Note: This implementation assumes an en-US QWERTY layout.


SendMode Input
#NoEnv
#SingleInstance force


options := {delay: 150, timeout: 300, doublePress: -1, swap_backtick_escape: false, mode: "ijkl"}
loop %0% {
   arg := %A_Index%
   argSplit := StrSplit(arg, "=")
   option := argSplit[1]
   value := argSplit[2]
   options[option] := value
}


#Include <dual/dual>
dual := new Dual


#Include <dual/defaults>


#If options.swap_backtick_escape
*`::dual.comboKey({F22: "Escape"})
#If


#If options.mode == "ijkl"
*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})

*u::dual.comboKey({F22: "Home"})
*o::dual.comboKey({F22: "End"})
*h::dual.comboKey({F22: "PgUp"})
*n::dual.comboKey({F22: "PgDn"})
#If


#If true ; Override defaults.ahk. There will be "duplicate hotkey" errors otherwise.
*Space::
*Space UP::dual.combine("F22", A_ThisHotkey, {delay: options.delay, timeout: options.timeout, doublePress: options.doublePress})

*BackSpace::dual.comboKey({F22: "Delete"})

*b::dual.comboKey({F22: "Space"})

*1::dual.comboKey({F22: "F1"})
*2::dual.comboKey({F22: "F2"})
*3::dual.comboKey({F22: "F3"})
*4::dual.comboKey({F22: "F4"})
*5::dual.comboKey({F22: "F5"})
*6::dual.comboKey({F22: "F6"})
*7::dual.comboKey({F22: "F7"})
*8::dual.comboKey({F22: "F8"})
*9::dual.comboKey({F22: "F9"})
*0::dual.comboKey({F22: "F10"})
*-::dual.comboKey({F22: "F11"})
*=::dual.comboKey({F22: "F12"})

*p::dual.comboKey({F22: "BackSpace"})
*;::dual.comboKey({F22: "Delete"})

*e::dual.comboKey({F22: "{Shift}+{Up}"})
*d::dual.comboKey({F22: "{Shift}+{Down}"})
*s::dual.comboKey({F22: "{Shift}+{Ctrl}+{Left"})
*f::dual.comboKey({F22: "{Shift}+{Ctrl}+{Right"})

*q::dual.comboKey({F22: "F3"})
*a::dual.comboKey({F22: "{Shift}+{F3}"})
*g::dual.comboKey({F22: "{Shift}+{Ctrl}+{l}"})

*CapsLock::Ctrl
#If


BTW, I want to report that using P and ; as Backspace and Delete has not been a problem so far.


Offline spiceBar

  • Posts: 998
    • ChessTiger.com
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #20 on: Mon, 05 January 2015, 01:11:58 »
Okay, after studying the tutorials and lots of trial an error, I've got most of my mapping working. This is what my mapping should look like ideally (using the MiniGuru as the background image, only because it's convenient):
(Attachment Link)
(In this context, "S" means Shift, and "C" means Ctrl, since room on each key is limited)

The part that's currently not working, is that although CapsLock now does work as Ctrl, Ctrl does not work as CapsLock.

Also, all the hotkeys that have Shift+Ctrl now only registers the Shift but not the Ctrl. I did have it working for a while but then it stopped working, although I didn't change anything that I know of that would have caused it, so I'm not sure what's wrong. I suspect the *CapsLock::Ctrl bit is causing the problem, but I took that out and the problem remained. Something else must be in conflict that I'm not seeing.

Here's my edited version of the script--maybe you guys can spot what's wrong with it:

Quote
; Note: This implementation assumes an en-US QWERTY layout.


SendMode Input
#NoEnv
#SingleInstance force


options := {delay: 150, timeout: 300, doublePress: -1, swap_backtick_escape: false, mode: "ijkl"}
loop %0% {
   arg := %A_Index%
   argSplit := StrSplit(arg, "=")
   option := argSplit[1]
   value := argSplit[2]
   options[option] := value
}


#Include <dual/dual>
dual := new Dual


#Include <dual/defaults>


#If options.swap_backtick_escape
*`::dual.comboKey({F22: "Escape"})
#If


#If options.mode == "ijkl"
*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})

*u::dual.comboKey({F22: "Home"})
*o::dual.comboKey({F22: "End"})
*h::dual.comboKey({F22: "PgUp"})
*n::dual.comboKey({F22: "PgDn"})
#If


#If true ; Override defaults.ahk. There will be "duplicate hotkey" errors otherwise.
*Space::
*Space UP::dual.combine("F22", A_ThisHotkey, {delay: options.delay, timeout: options.timeout, doublePress: options.doublePress})

*BackSpace::dual.comboKey({F22: "Delete"})

*b::dual.comboKey({F22: "Space"})

*1::dual.comboKey({F22: "F1"})
*2::dual.comboKey({F22: "F2"})
*3::dual.comboKey({F22: "F3"})
*4::dual.comboKey({F22: "F4"})
*5::dual.comboKey({F22: "F5"})
*6::dual.comboKey({F22: "F6"})
*7::dual.comboKey({F22: "F7"})
*8::dual.comboKey({F22: "F8"})
*9::dual.comboKey({F22: "F9"})
*0::dual.comboKey({F22: "F10"})
*-::dual.comboKey({F22: "F11"})
*=::dual.comboKey({F22: "F12"})

*p::dual.comboKey({F22: "BackSpace"})
*;::dual.comboKey({F22: "Delete"})

*e::dual.comboKey({F22: "{Shift}+{Up}"})
*d::dual.comboKey({F22: "{Shift}+{Down}"})
*s::dual.comboKey({F22: "{Shift}+{Ctrl}+{Left"})
*f::dual.comboKey({F22: "{Shift}+{Ctrl}+{Right"})

*q::dual.comboKey({F22: "F3"})
*a::dual.comboKey({F22: "{Shift}+{F3}"})
*g::dual.comboKey({F22: "{Shift}+{Ctrl}+{l}"})

*CapsLock::Ctrl
#If


BTW, I want to report that using P and ; as Backspace and Delete has not been a problem so far.

If "P" and ";" work for Backspace and Delete, then great. Just use them.

I know absolutely nothing about AHK, and I don't understand the script.

However, I'm a programmer, and those two lines look very suspicious, especially when I compare them to the lines immediately above:
  *s::dual.comboKey({F22: "{Shift}+{Ctrl}+{Left"})
  *f::dual.comboKey({F22: "{Shift}+{Ctrl}+{Right"})

I think the following would be better:
  *s::dual.comboKey({F22: "{Shift}+{Ctrl}+{Left}"})
  *f::dual.comboKey({F22: "{Shift}+{Ctrl}+{Right}"})

The rule is when you open the curly braces, you must close them later. In your script, the curly brace opened just before "Left" (or "Right") is never closed. That is suspicious.

The rules applies to parenthesis, square brackets and double quotes as well. Double quotes are special because they close any preceding double quotes, but you get the picture.

Parenthesis, square brackets, curly braces and double quotes must be balanced.

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #21 on: Mon, 05 January 2015, 21:20:27 »
If "P" and ";" work for Backspace and Delete, then great. Just use them.

I know absolutely nothing about AHK, and I don't understand the script.

However, I'm a programmer, and those two lines look very suspicious, especially when I compare them to the lines immediately above:
  *s::dual.comboKey({F22: "{Shift}+{Ctrl}+{Left"})
  *f::dual.comboKey({F22: "{Shift}+{Ctrl}+{Right"})

I think the following would be better:
  *s::dual.comboKey({F22: "{Shift}+{Ctrl}+{Left}"})
  *f::dual.comboKey({F22: "{Shift}+{Ctrl}+{Right}"})

The rule is when you open the curly braces, you must close them later. In your script, the curly brace opened just before "Left" (or "Right") is never closed. That is suspicious.

The rules applies to parenthesis, square brackets and double quotes as well. Double quotes are special because they close any preceding double quotes, but you get the picture.

Parenthesis, square brackets, curly braces and double quotes must be balanced.

I've corrected those lines, but nothing's changed. This is driving me crazy.

Offline spiceBar

  • Posts: 998
    • ChessTiger.com
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #22 on: Tue, 06 January 2015, 22:23:04 »
If "P" and ";" work for Backspace and Delete, then great. Just use them.

I know absolutely nothing about AHK, and I don't understand the script.

However, I'm a programmer, and those two lines look very suspicious, especially when I compare them to the lines immediately above:
  *s::dual.comboKey({F22: "{Shift}+{Ctrl}+{Left"})
  *f::dual.comboKey({F22: "{Shift}+{Ctrl}+{Right"})

I think the following would be better:
  *s::dual.comboKey({F22: "{Shift}+{Ctrl}+{Left}"})
  *f::dual.comboKey({F22: "{Shift}+{Ctrl}+{Right}"})

The rule is when you open the curly braces, you must close them later. In your script, the curly brace opened just before "Left" (or "Right") is never closed. That is suspicious.

The rules applies to parenthesis, square brackets and double quotes as well. Double quotes are special because they close any preceding double quotes, but you get the picture.

Parenthesis, square brackets, curly braces and double quotes must be balanced.

I've corrected those lines, but nothing's changed. This is driving me crazy.

Ask for help in a new topic. I cannot help you and apparently too few people read the current thread.

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #23 on: Wed, 07 January 2015, 00:23:40 »
Ask for help in a new topic. I cannot help you and apparently too few people read the current thread.

I did post a thread on ahkscript.org's forum, but no replies yet.

Maybe if I posted in your original thread for SpaceFN, I might get some answers? I'll try that and see what happens.

Offline lydell

  • Posts: 42
  • Location: Sweden
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #24 on: Wed, 07 January 2015, 13:22:51 »
Lunatique, try this:


Code: [Select]
; Note: This implementation assumes an en-US QWERTY layout.


SendMode Input
#NoEnv
#SingleInstance force


#Include <dual/dual>
dual := new Dual


#Include <dual/defaults>


#If true ; Override defaults.ahk. There will be "duplicate hotkey" errors otherwise.
*Space::
*Space UP::dual.combine("F22", A_ThisHotkey, {delay: 150, timeout: 300, doublePress: -1})

*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})

*u::dual.comboKey({F22: "Home"})
*o::dual.comboKey({F22: "End"})
*h::dual.comboKey({F22: "PgUp"})
*n::dual.comboKey({F22: "PgDn"})

*BackSpace::dual.comboKey({F22: "Delete"})

*b::dual.comboKey({F22: "Space"})

*1::dual.comboKey({F22: "F1"})
*2::dual.comboKey({F22: "F2"})
*3::dual.comboKey({F22: "F3"})
*4::dual.comboKey({F22: "F4"})
*5::dual.comboKey({F22: "F5"})
*6::dual.comboKey({F22: "F6"})
*7::dual.comboKey({F22: "F7"})
*8::dual.comboKey({F22: "F8"})
*9::dual.comboKey({F22: "F9"})
*0::dual.comboKey({F22: "F10"})
*-::dual.comboKey({F22: "F11"})
*=::dual.comboKey({F22: "F12"})

*p::dual.comboKey({F22: "BackSpace"})
*;::dual.comboKey({F22: "Delete"})

*e::dual.comboKey({F22: ["Shift down", "Up", "Shift up"]})
*d::dual.comboKey({F22: ["Shift down", "Down", "Shift up"]})
*s::dual.comboKey({F22: ["Shift down", "Ctrl down", "Left", "Shift up", "Ctrl up"]})
*f::dual.comboKey({F22: ["Shift down", "Ctrl down", "Right", "Shift up", "Ctrl up"]})

*q::dual.comboKey({F22: "F3"})
*a::dual.comboKey({F22: ["Shift down", "F3", "Shift up"]})
*g::dual.comboKey({F22: ["Shift down", "Ctrl down", "l", "Shift up", "Ctrl up"]})

CapsLock::Ctrl
LCtrl::Capslock
#If

However, I’m not sure at all those keys that send shift and ctrl. I think I
never considered this case when I wrote dual. If that does not cut it, something
like this might:

Code: [Select]
s::
    dual.combo()
    if (GetKeyState("F12")) {
        SendInput +^Left
    } else {
        SendInput s
    }
    return

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #25 on: Wed, 07 January 2015, 13:54:55 »
Thanks so much for helping out.
Lunatique, try this:


Code: [Select]
; Note: This implementation assumes an en-US QWERTY layout.


SendMode Input
#NoEnv
#SingleInstance force


#Include <dual/dual>
dual := new Dual


#Include <dual/defaults>


#If true ; Override defaults.ahk. There will be "duplicate hotkey" errors otherwise.
*Space::
*Space UP::dual.combine("F22", A_ThisHotkey, {delay: 150, timeout: 300, doublePress: -1})

*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})

*u::dual.comboKey({F22: "Home"})
*o::dual.comboKey({F22: "End"})
*h::dual.comboKey({F22: "PgUp"})
*n::dual.comboKey({F22: "PgDn"})

*BackSpace::dual.comboKey({F22: "Delete"})

*b::dual.comboKey({F22: "Space"})

*1::dual.comboKey({F22: "F1"})
*2::dual.comboKey({F22: "F2"})
*3::dual.comboKey({F22: "F3"})
*4::dual.comboKey({F22: "F4"})
*5::dual.comboKey({F22: "F5"})
*6::dual.comboKey({F22: "F6"})
*7::dual.comboKey({F22: "F7"})
*8::dual.comboKey({F22: "F8"})
*9::dual.comboKey({F22: "F9"})
*0::dual.comboKey({F22: "F10"})
*-::dual.comboKey({F22: "F11"})
*=::dual.comboKey({F22: "F12"})

*p::dual.comboKey({F22: "BackSpace"})
*;::dual.comboKey({F22: "Delete"})

*e::dual.comboKey({F22: ["Shift down", "Up", "Shift up"]})
*d::dual.comboKey({F22: ["Shift down", "Down", "Shift up"]})
*s::dual.comboKey({F22: ["Shift down", "Ctrl down", "Left", "Shift up", "Ctrl up"]})
*f::dual.comboKey({F22: ["Shift down", "Ctrl down", "Right", "Shift up", "Ctrl up"]})

*q::dual.comboKey({F22: "F3"})
*a::dual.comboKey({F22: ["Shift down", "F3", "Shift up"]})
*g::dual.comboKey({F22: ["Shift down", "Ctrl down", "l", "Shift up", "Ctrl up"]})

CapsLock::Ctrl
LCtrl::Capslock
#If

That didn't work. It caused the CapsLock to remain locked and cannot be turned off, which also means the keyboard acts like the Shift is always down.

However, I’m not sure at all those keys that send shift and ctrl. I think I
never considered this case when I wrote dual. If that does not cut it, something
like this might:

Code: [Select]
s::
    dual.combo()
    if (GetKeyState("F12")) {
        SendInput +^Left
    } else {
        SendInput s
    }
    return

Where would I put that piece of code? Just insert anywhere within the script?

BTW, if SpaceFN could be rewritten to be more flexible so we can customize it with our own shortcuts, hotkeys, combos, mapping, etc, then I think it'll gain popularity due to how flexible it is. Also, if we can use other keys as the Fn key instead of only the spacebar, the would be awesome too (for example, us Alt instead, or CapsLock).

Offline lydell

  • Posts: 42
  • Location: Sweden
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #26 on: Wed, 07 January 2015, 14:32:29 »
That didn't work. It caused the CapsLock to remain locked and cannot be turned off, which also means the keyboard acts like the Shift is always down.

Apart from the CapsLock issues, did it work then? Did you try removing the two lines containing the word CapsLock? Do any of the following cut it?

Code: [Select]
*CapsLock::Ctrl
LCtrl::Capslock
Code: [Select]
CapsLock::Ctrl
*LCtrl::Capslock
Code: [Select]
*CapsLock::Ctrl
*LCtrl::Capslock

Where would I put that piece of code? Just insert anywhere within the script?

You didn’t say that the shift/ctrl shortcuts didn’t work, so you shouldn’t need to bother. But if you do want to try it out, replace for instance the `*s::...` line with it.

BTW, if SpaceFN could be rewritten to be more flexible so we can customize it with our own shortcuts, hotkeys, combos, mapping, etc, then I think it'll gain popularity due to how flexible it is.

SpaceFN isn’t a program, so it cannot be “rewritten” the way you’re talking about. Specific implementations can, though. However, what you’re saying is more of “I’m looking for a program or firmware that easily allows me to do X and Y, inspired by the SpaceFN layout”.

Also, if we can use other keys as the Fn key instead of only the spacebar, the would be awesome too (for example, us Alt instead, or CapsLock).

You can using the AHK implementation. Just change the word `Space` to whatever you want.

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #27 on: Wed, 07 January 2015, 19:58:16 »
Okay, what else is happening, is that once any of the hotkeys involving Shift and Ctrl are used, the script will causing wherever I click to highlight blocks of text, as if the Shift is being held down, and there's no way to undo the behavior, and whatever I type gets shifted too. The Ctrl key appears to be locked down too, since clicking on various things will open up windows, properties, and simple mouse clicks stops working. Even terminating SpaceFN doesn't seem to help and I have no idea how to get the keyboard "unstuck," so the last resort is to just mash down on a bunch of random keys with my palms and that somehow cancels whatever lock there is on the Shift and Ctrl.








Offline lydell

  • Posts: 42
  • Location: Sweden
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #28 on: Thu, 08 January 2015, 11:25:46 »
Ok, so the CapsLock problem was a red herring. I see.

Modifiers getting stuck is a problem in AHK I’ve run into many times. Usually, it is enough to turn off the AutoHotkey script, and then press each modifier once.

You can also try to add this shortcut:

Code: [Select]
; Note the `*`! It allows you to press ScrollLock even if a modifier is stuck.
*ScrollLock::dual.reset()

If none of those two methods work, the last resort is rebooting the computer.

Summing up, my guess that `dual.comboKey({F22: ["Shift down", "Ctrl down", "Left", "Shift up", "Ctrl up"]})` would work was wrong. Perhaps this works, though:

Code: [Select]
; Note: This implementation assumes an en-US QWERTY layout.


SendMode Input
#NoEnv
#SingleInstance force


#Include <dual/dual>
dual := new Dual


#Include <dual/defaults>


combo(key) {
  dual.combo(1)
  if (GetKeyState("F12")) {
    SendInput % key
  } else {
    SendInput % A_ThisHotkey
  }
  return
}


#If true ; Override defaults.ahk. There will be "duplicate hotkey" errors otherwise.
*Space::
*Space UP::dual.combine("F22", A_ThisHotkey, {delay: 150, timeout: 300, doublePress: -1})

*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})

*u::dual.comboKey({F22: "Home"})
*o::dual.comboKey({F22: "End"})
*h::dual.comboKey({F22: "PgUp"})
*n::dual.comboKey({F22: "PgDn"})

*BackSpace::dual.comboKey({F22: "Delete"})

*b::dual.comboKey({F22: "Space"})

*1::dual.comboKey({F22: "F1"})
*2::dual.comboKey({F22: "F2"})
*3::dual.comboKey({F22: "F3"})
*4::dual.comboKey({F22: "F4"})
*5::dual.comboKey({F22: "F5"})
*6::dual.comboKey({F22: "F6"})
*7::dual.comboKey({F22: "F7"})
*8::dual.comboKey({F22: "F8"})
*9::dual.comboKey({F22: "F9"})
*0::dual.comboKey({F22: "F10"})
*-::dual.comboKey({F22: "F11"})
*=::dual.comboKey({F22: "F12"})

*p::dual.comboKey({F22: "BackSpace"})
*;::dual.comboKey({F22: "Delete"})

*e::combo("+{Up}")
*d::combo("+{Down}")
*s::combo("+^{Left}")
*f::combo("+^{Right}")

*q::dual.comboKey({F22: "F3"})
*a::combo("+{F3}")
*g::combo("+^l")

CapsLock::Ctrl
LCtrl::Capslock
#If

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #29 on: Fri, 09 January 2015, 02:57:44 »
Summing up, my guess that `dual.comboKey({F22: ["Shift down", "Ctrl down", "Left", "Shift up", "Ctrl up"]})` would work was wrong. Perhaps this works, though:

Code: [Select]
; Note: This implementation assumes an en-US QWERTY layout.


SendMode Input
#NoEnv
#SingleInstance force


#Include <dual/dual>
dual := new Dual


#Include <dual/defaults>


combo(key) {
  dual.combo(1)
  if (GetKeyState("F12")) {
    SendInput % key
  } else {
    SendInput % A_ThisHotkey
  }
  return
}


#If true ; Override defaults.ahk. There will be "duplicate hotkey" errors otherwise.
*Space::
*Space UP::dual.combine("F22", A_ThisHotkey, {delay: 150, timeout: 300, doublePress: -1})

*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})

*u::dual.comboKey({F22: "Home"})
*o::dual.comboKey({F22: "End"})
*h::dual.comboKey({F22: "PgUp"})
*n::dual.comboKey({F22: "PgDn"})

*BackSpace::dual.comboKey({F22: "Delete"})

*b::dual.comboKey({F22: "Space"})

*1::dual.comboKey({F22: "F1"})
*2::dual.comboKey({F22: "F2"})
*3::dual.comboKey({F22: "F3"})
*4::dual.comboKey({F22: "F4"})
*5::dual.comboKey({F22: "F5"})
*6::dual.comboKey({F22: "F6"})
*7::dual.comboKey({F22: "F7"})
*8::dual.comboKey({F22: "F8"})
*9::dual.comboKey({F22: "F9"})
*0::dual.comboKey({F22: "F10"})
*-::dual.comboKey({F22: "F11"})
*=::dual.comboKey({F22: "F12"})

*p::dual.comboKey({F22: "BackSpace"})
*;::dual.comboKey({F22: "Delete"})

*e::combo("+{Up}")
*d::combo("+{Down}")
*s::combo("+^{Left}")
*f::combo("+^{Right}")

*q::dual.comboKey({F22: "F3"})
*a::combo("+{F3}")
*g::combo("+^l")

CapsLock::Ctrl
LCtrl::Capslock
#If

This one makes all the hotkeys on the left side type a * and then followed by the alphabet, regardless if the spacebar is held down or not.

Offline lydell

  • Posts: 42
  • Location: Sweden
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #30 on: Fri, 09 January 2015, 10:06:11 »
Try replacing this line:

Code: [Select]
SendInput % A_ThisHotkey

with:

Code: [Select]
currentKey := Dual.cleanKey(A_ThisHotkey)
SendInput {Blind}{%currentKey%}

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #31 on: Fri, 09 January 2015, 14:51:05 »
Try replacing this line:

Code: [Select]
SendInput % A_ThisHotkey

with:

Code: [Select]
currentKey := Dual.cleanKey(A_ThisHotkey)
SendInput {Blind}{%currentKey%}

That didn't work. All the keys with my mapping now just behaves like normal alphabet keys, while the original ones mapped by spiceBar still works. The damn Shift and Ctrl are what's messing with this script.  :'(

The one I customized originally had the Shift key working, but not the Control key. Maybe the answer is to modify that version and get the Control key recognized?

Thanks for taking the time, BTW. I really appreciate you helping me.

Offline lydell

  • Posts: 42
  • Location: Sweden
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #32 on: Fri, 09 January 2015, 16:37:49 »
Doh, I made the silliest typo in the code :( Try changing
Code: [Select]
if (GetKeyState("F12")) { to
Code: [Select]
if (GetKeyState("F22")) { (note F12 -> F22).

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #33 on: Fri, 09 January 2015, 19:20:53 »
lydell, you f-cking ROCK!  :thumb: :-*

Everything is working perfectly now, and you also seemed to have fixed a problem I had before but never mentioned, which is whatever I mapped to the Q and A keys get triggered by accident easily while others don't. It might have had something to do with my typing habits (my right thumb on the spacebar might linger a bit longer as I reach towards those two alphabets), but now the problem is gone, so I'm assuming it was the script that was causing it, not my typing.

I was also able to customize the script further with more custom mapping.This is what I have as my current mapping:

86842-0

And for those of you who are following this thread, here's the perfectly working script, with my custom mapping (and you can customize your own based on whatever you prefer, since lydell has now made it very easy to modify with your own mapping):

Code: [Select]
; Note: This implementation assumes an en-US QWERTY layout.


SendMode Input
#NoEnv
#SingleInstance force


#Include <dual/dual>
dual := new Dual


#Include <dual/defaults>


combo(key) {
  dual.combo(1)
  if (GetKeyState("F22")) {
    SendInput % key
  } else {
    currentKey := Dual.cleanKey(A_ThisHotkey)
SendInput {Blind}{%currentKey%}
  }
  return
}


#If true ; Override defaults.ahk. There will be "duplicate hotkey" errors otherwise.
*Space::
*Space UP::dual.combine("F22", A_ThisHotkey, {delay: 150, timeout: 300, doublePress: -1})

*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})

*u::dual.comboKey({F22: "Home"})
*o::dual.comboKey({F22: "End"})
*h::dual.comboKey({F22: "PgUp"})
*n::dual.comboKey({F22: "PgDn"})

*/::combo("^{Up}")
*.::combo("^{Down}")
*m::combo("^{Left}")
*,::combo("^{Right}")

*BackSpace::dual.comboKey({F22: "Delete"})

*1::dual.comboKey({F22: "F1"})
*2::dual.comboKey({F22: "F2"})
*3::dual.comboKey({F22: "F3"})
*4::dual.comboKey({F22: "F4"})
*5::dual.comboKey({F22: "F5"})
*6::dual.comboKey({F22: "F6"})
*7::dual.comboKey({F22: "F7"})
*8::dual.comboKey({F22: "F8"})
*9::dual.comboKey({F22: "F9"})
*0::dual.comboKey({F22: "F10"})
*-::dual.comboKey({F22: "F11"})
*=::dual.comboKey({F22: "F12"})

*p::dual.comboKey({F22: "BackSpace"})
*;::dual.comboKey({F22: "Delete"})

*e::combo("+{Up}")
*d::combo("+{Down}")
*s::combo("+^{Left}")
*f::combo("+^{Right}")

*a::dual.comboKey({F22: "F3"})
*q::combo("+{F3}")
*w::combo("+{Home}")
*r::combo("+{End}")
*t::combo("+^l")

*g::combo("+{PgUp}")
*b::combo("+{PgDn}")

*z::combo("+{Up}")
*x::combo("+{Down}")
*c::combo("+{Left}")
*v::combo("+{Right}")

CapsLock::Ctrl
#If

lydell, again, thank you so much for taking the time. This is going to make a big difference in how efficient I can be when I write my novels or just typing in general. Perhaps in the future, I'll try to expand the mapping into something even more comprehensive, covering different workflows and software I use.

Offline SeeThruHead

  • Posts: 87
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #34 on: Fri, 09 January 2015, 23:15:48 »
I thought I'd chime in on your OP since I've been doing some research into which pcb i'm going to buy. I believe currently the infinity and gh60 are the most programmable. They both support tmk firmware which means you can do fun things like dual mode keys, like the classic control or esc key. After that i would say it is gons pcbs, his can do full remap but I don't think it can do dual role keys. So you wouldn't be able to do fun things with control/esc or program spacefn without using software. Hope that helps.
    

 Painted QFR          Poker 2

Offline Lunatique

  • Thread Starter
  • Posts: 292
  • Writer, Composer, Artist, Photographer, Gamer
Re: Which keyboards have the best (or programmable) Fn layer?
« Reply #35 on: Mon, 26 January 2015, 02:12:26 »
Something's wrong. The script is still going crazy sometimes, where it acts like the Shift key is constantly down and existing AHK doesn't fix it--I'd have to reboot. Is this a common issue inherent in AHK that we cannot fix (the developer of AHK will have to do it)?