geekhack
geekhack Community => Keyboards => Topic started by: Lanx on Thu, 09 December 2010, 12:08:47
-
I've been trying to figure out a way to create the FN functionality in my v2 mod. Basically we know FN+ (whatever) gives us a different set, like in laptops youd have jklui78 as the tenkey and maybe some media functions (like f1=play f2=stop)
i've been trying to basically connect 4 pins/wires to a keyswitch, and when one on/off spdt switch is pressed the key functions as one key or another (for example "j" can be "1")
But i'm at a loss how to do this across the board with 1 FN switch w/o having all these wires crossed, i was thinking about making an entire mini board for it, but just can't figure out how that'd go.
any suggestions would be nice, i'm at a complete loss now, it's not "crucial" i have this in my v2 mod, i just thought it'd be nice to have and cool to implement.
(i do not want to have this implemented in software or AHK, only hardware).
-
I've been trying to figure out a way to create the FN functionality in my v2 mod. Basically we know FN+ (whatever) gives us a different set, like in laptops youd have jklui78 as the tenkey and maybe some media functions (like f1=play f2=stop)
i've been trying to basically connect 4 pins/wires to a keyswitch, and when one on/off spdt switch is pressed the key functions as one key or another (for example "j" can be "1")
But i'm at a loss how to do this across the board with 1 FN switch w/o having all these wires crossed, i was thinking about making an entire mini board for it, but just can't figure out how that'd go.
any suggestions would be nice, i'm at a complete loss now, it's not "crucial" i have this in my v2 mod, i just thought it'd be nice to have and cool to implement.
(i do not want to have this implemented in software or AHK, only hardware).
I don't think you can easily do this in just pure hardware without the cable mess. The only logical solution is that it has to be solved in code in the keyboard controller firmware.
Pseudo code:
if(j_key_down()){
if(fn_key_down()){
send_scancode(num_1);
} else {
send_scancode(j);
}
}
At least this is how all of the laptop FN keys should work, purely firmware based.
-
The easiest way would be to use a key remapping tool.
Under Unix/Linux, you could map the key you want as Fn to be some obsolete rare modifier and map your wanted Fn-key combos to that modifier.
-
Do you use xmodmap or the xkb control functions to do that?
I've been trying to make that work in conjunction with synergy for a while, but it just fails a lot.
-
Do you use xmodmap or the xkb control functions to do that?
I've been trying to make that work in conjunction with synergy for a while, but it just fails a lot.
I haven't actually tried it, but from the man page it seems like you should be able to do the equivalent of an Fn key with xmodmap by binding a keycode to "Mode_switch" and then specifying the third keysym for the keycodes in question.
-
is xmodmap basically autohotkey stuff?
do not want... guess i might have to look into building my own transistor!
-
If you want to do something with xmodmap, I can probably help.
You can use the ISO Shift Level 3 and 5, for alternate layouts fairly easily. Provided your xkb has been initialized properly.
If you want to do it with loadkeys (I can also help). You should be able to do it with some of the upper shift levels.
Haven't had the time to figure it out completely with xkb though.
So, let me know if you want some example configs.
As well, xmodmap is not like autohotkey. There are no if statements, just key assignments (with various levels). It is just a means to tell xkb to do some modifications to the current keymap lookup table (e.g. native).
-
would i be better off connecting the switches to a teensy++ and have that as my intermediary?
(note i have no idea how to program or whatever with the teensy)
-
hmmm searching for teensy on ebay brings... less than desirable results. (i just want the board no extra fluff!)
-
hmmm searching for teensy on ebay brings... less than desirable results. (i just want the board no extra fluff!)
i bought mine from here... although this is the small one, not the big one with more pins
http://www.adafruit.com/index.php?main_page=product_info&cPath=16&products_id=199
-
i don't even know what i should buy or what works with what i'm thinking lol! (someone please tell me i'll be on the right track if the teensy is the way to go)
link appreciated.
-
I found teensy++ is back in stock now!! see PJRC store.
I will buy another one for next project.
p.s.
I recommend teensy++ for its clean pinouts and
"without header pins" is better for installment inside not-roomy keyboard.
http://www.pjrc.com/store/teensypp.html
-
the pin ones aren't even in stock anyway. But they have like 9$ shipping, which i wouldn't mind but that's like 50% of the thing and it's the size of a flash drive...