geekhack

geekhack Community => Keyboards => Topic started by: blastoid on Tue, 10 March 2015, 12:55:03

Title: Model M hacking for programmability
Post by: blastoid on Tue, 10 March 2015, 12:55:03
What would be needed to hack full programmability into a Model M? Would it even be possible? I'm assuming one would need something like a teensy or mchck board?

Someone has probably done this before, but my searching came up empty.
Title: Re: Model M hacking for programmability
Post by: SpAmRaY on Tue, 10 March 2015, 12:56:01
you can build a soarer converter with a teensy
Title: Re: Model M hacking for programmability
Post by: blastoid on Tue, 10 March 2015, 13:19:16
you can build a soarer converter with a teensy
That's cool and all, but it looks like it's mainly just a USB converter. I was actually thinking of replacing the existing PCB with a fully programmable one. Unless there could be an inline programmable. Like, if I want my W key to be a 3rd-level Fn for macros... that sort of programmability. I don't imagine that could be done on an inline converter.
Title: Re: Model M hacking for programmability
Post by: vivalarevolución on Tue, 10 March 2015, 13:42:26
My boy in naptown is working on this:

http://deskthority.net/workshop-f7/universal-model-m-controller-t9820.html
Title: Re: Model M hacking for programmability
Post by: blastoid on Tue, 10 March 2015, 13:46:49
My boy in naptown is working on this:

http://deskthority.net/workshop-f7/universal-model-m-controller-t9820.html

Perfect! Thanks!
Title: Re: Model M hacking for programmability
Post by: E TwentyNine on Tue, 10 March 2015, 13:57:31
you can build a soarer converter with a teensy
That's cool and all, but it looks like it's mainly just a USB converter. I was actually thinking of replacing the existing PCB with a fully programmable one. Unless there could be an inline programmable. Like, if I want my W key to be a 3rd-level Fn for macros... that sort of programmability. I don't imagine that could be done on an inline converter.

Sure it could.  I don't know if Soarer's code could do it (don't think it does locking layers) but there have been others written that could, like Hasu's.

https://geekhack.org/index.php?topic=14618.0
Title: Re: Model M hacking for programmability
Post by: Jotokun on Tue, 10 March 2015, 14:28:06
you can build a soarer converter with a teensy
That's cool and all, but it looks like it's mainly just a USB converter. I was actually thinking of replacing the existing PCB with a fully programmable one. Unless there could be an inline programmable. Like, if I want my W key to be a 3rd-level Fn for macros... that sort of programmability. I don't imagine that could be done on an inline converter.

Sure it could.  I don't know if Soarer's code could do it (don't think it does locking layers) but there have been others written that could, like Hasu's.

https://geekhack.org/index.php?topic=14618.0

It is capable of locking layers. I've got the one in my M set up to swap Ctrl and Caps lock, and toggle hjkl arrow movement on certain key combinations.
Title: Re: Model M hacking for programmability
Post by: E TwentyNine on Tue, 10 March 2015, 14:48:16
It is capable of locking layers. I've got the one in my M set up to swap Ctrl and Caps lock, and toggle hjkl arrow movement on certain key combinations.

Thanks, don't recall that being a function last time I really dug into it.

You have a sample .sc that will toggle a locking layer?  I don't remember seeing it in the docs and when I tried I was only able to get it to be a momentary activation.
Title: Re: Model M hacking for programmability
Post by: Jotokun on Tue, 10 March 2015, 15:24:29
It is capable of locking layers. I've got the one in my M set up to swap Ctrl and Caps lock, and toggle hjkl arrow movement on certain key combinations.

Thanks, don't recall that being a function last time I really dug into it.

You have a sample .sc that will toggle a locking layer?  I don't remember seeing it in the docs and when I tried I was only able to get it to be a momentary activation.

Sure. With this setup, right Ctrl is an Fn key, FN + Ctrl or FN + Caps will swap the caps, FN + Space will remap hjkl.

Main .sc:
Code: [Select]
#Keyboard config for 1986 Terminal Silver Label Model M

ifselect 1
include 1986silver_swapCapsCtrl.sc

ifselect 3
include 1986silver_vimnav.sc

ifselect any

layerblock
FN1 2
endblock

#fix incorrect keys
remapblock
#Top row section
F13 ESC
F23 PRINTSCREEN
F24 SCROLL_LOCK
LANG_4 PAUSE

#Numpad section
ESC NUM_LOCK
NUM_LOCK PAD_SLASH
SCROLL_LOCK PAD_ASTERIX
EXTRA_SYSRQ PAD_MINUS
PAD_ASTERIX PAD_MINUS #Extra numpad key
PAD_MINUS PAD_PLUS
PAD_PLUS PAD_ENTER

LCTRL LGUI
RCTRL FN1

endblock

remapblock
layer 2 #Key bindings are as if above remap doesn't exist

F23 MEDIA_MUTE #PRINTSCREEN
F24 MEDIA_VOLUME_DOWN #SCROLL_LOCK
LANG_4 MEDIA_VOLUME_UP #PAUSE

F13 SYSTEM_SLEEP #ESC

RALT RALT #LGUI
ENTER RCTRL

H LEFT
J DOWN
K UP
L RIGHT

LSHIFT CAPS_LOCK

CAPS_LOCK SELECT_1
LCTRL SELECT_1

SPACE SELECT_3

endblock

caps lock sc:
Code: [Select]
remapblock
LCTRL CAPS_LOCK
CAPS_LOCK LCTRL
endblock

vim sc:
Code: [Select]
remapblock

I SELECT_3

H LEFT
J DOWN
K UP
L RIGHT

1 F1
2 F2
3 F3
4 F4
5 F5
6 F6
7 F7
8 F8
9 F9
0 F10
MINUS F11
EQUAL F12

BACK_QUOTE ESC
endblock
Title: Re: Model M hacking for programmability
Post by: E TwentyNine on Tue, 10 March 2015, 15:40:27
It is capable of locking layers. I've got the one in my M set up to swap Ctrl and Caps lock, and toggle hjkl arrow movement on certain key combinations.

Thanks, don't recall that being a function last time I really dug into it.

You have a sample .sc that will toggle a locking layer?  I don't remember seeing it in the docs and when I tried I was only able to get it to be a momentary activation.

Sure. With this setup, right Ctrl is an Fn key, FN + Ctrl or FN + Caps will swap the caps, FN + Space will remap hjkl.

Don't know how I missed the SELECT_n properties in the config docs, I'm not big on layering but like to know what the code can do...

Thanks.