name: title layout: true class: middle, center, inverse --- # 60% black mechanical keyboard ## crow ??? [time] 17 ; 47 --- layout: false .left-column[ ## .active[agenda] ] -- - ### 60% -- - ### black -- - ### mechanical -- - ### keyboard -- - ### crow -- .footnote[ .right[.red[*] This is what this presentation is all about, right?] ] .ribbon[?] --- template: title # 60% ??? [time] 0 ; 3 --- .left-column[ ### .active[60%] - .active[size] - standard - key ] .right-column[.center.middle[  ## .fg00[100% - 105 keys] ## .bg04[80% - 88 keys] ## .bg01[60% - 62 keys] ] .footnote[.right[.red[*] ISO]] ] ??? * big enter * short left shift with key between it and 'z' * 50% - 48 keys --- .left-column[ ### .active[60%] - .active[size] - standard - key ] .right-column[.center.middle[  ## .fg00[100% - 104 keys] ## .bg04[80% - 87 keys] ## .bg01[60% - 61 keys] ] .footnote[.right[.red[*] ANSI]] ] ??? * one key less than ISO * smaller enter * longer left shift * 50% - 47 keys --- .left-column[ ### .active[60%] - size - .active[standard] - key ] .right-column[.center.middle[ ## ISO  ## ANSI  ]] ??? What are the differences? --- .left-column[ ### .active[60%] - size - .active[standard] - key ] .right-column[.center.middle[ ## ISO  ## ANSI  ]] ??? enter island --- .left-column[ ### .active[60%] - size - .active[standard] - key ] .right-column[.center.middle[ ## ISO  ## ANSI  ]] ??? * left shift island * one additional key in ANSI --- .left-column[ ### .active[60%] - size - standard - .active[key] ] .right-column[.center[  ]] .ribbon[?] ??? differet key sizes, arbitrary unit * all letters are box 1x1 * progression is with 0.25 * longest is spacebar (shortest I have seen was 3!), for me minimum 5 --- template: title # Black ??? [time] 8 ; 11 --- .left-column[ ### 60% ### .active[black] - .active[keycaps] - profiles ] .right-column[ .fill[] ] --- .left-column[ ### 60% ### .active[black] - .active[keycaps] - profiles ] .right-column[ .fill[] ] ??? different colors --- .left-column[ ### 60% ### .active[black] - .active[keycaps] - profiles ] .right-column[ .fill[] ] ??? semitranspared --- .left-column[ ### 60% ### .active[black] - .active[keycaps] - profiles ] .right-column[ .fill[] ] ??? (very) nonstandard labeling --- .left-column[ ### 60% ### .active[black] - .active[keycaps] - profiles ] .right-column[ .fill[] ] ??? printed on the side (my favorite!) --- .left-column[ ### 60% ### .active[black] - .active[keycaps] - profiles ] .right-column[ .fill[] ] ??? Different shapes, now with 3d-printing gets very popular. --- .left-column[ ### 60% ### .active[black] - keycaps - .active[profiles] ] .right-column[  ] .ribbon[?] ??? * rows are marked, from bottom (spacebar row) * makes it more 'ergonomic' * taken from cherry mx documentation --- template: title # Mechanical ??? [time] 6 ; 17 --- .left-column[ ### 60% ### black ### .active[mechanical] - .active[switches] - wiring ] .right-column[  ] ??? Switch is not very complicated: * plastic frame * spring * cross, plastic pin which is moving * often the middle pin is oiled --- .left-column[ ### 60% ### black ### .active[mechanical] - .active[switches] - wiring ] .right-column[  ] ??? Those are for cherry, but it is quite a standard thing. * colors normally means sound level and 'feel' * red is soft but does not provide 'feeled' click on activation * blue is soft as red, but does have 'click' on 'activation' (both feel and sound) * brown has only 'feel' * green is 'hardest' to press * there is also a difference in force needed to press --- .left-column[ ### 60% ### black ### .active[mechanical] - .active[switches] - wiring ] .right-column[     ] ??? section * the main (only?) difference is the pin shape work * depending on the little hook the feel and sound is different --- .left-column[ ### 60% ### black ### .active[mechanical] - .active[switches] - wiring ] .right-column[  ] ??? Rubbers on keycaps mounted for noise reduction. --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[ ] ??? Let us create some setup! --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? microcontoller --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? switch --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? power and ground --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? wiring with "pull-up" resistor --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? all done --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? inactive state: Currency goes from VCC to GND. --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? active state: Currency goes from PIN to GND. --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? so, now... --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? ... lets add more switches --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? one more --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? all of them --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? all ... --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? ... works ... --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? ... good --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? That is a lot of switches and pins. Number of switches cannot be reduced. * it is physical limitation, to have 62 keys we need 62 switches Number of pins can be reduced: * we can use matrix to reduce number of pins * control both ends of wire Layout: * ISO --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? step first: * control both sides of currency --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? Does it still work? --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? We assume pull-up resistor to be in microcontoller. --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? matrix --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[ ### N rows ### M columns ### N * M keys ### N + M pins ### #pins = 2 * log(#keys) ] --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? one key - OK --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? more - OK --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] ??? until... shadowing --- .left-column[ ### 60% ### black ### .active[mechanical] - switches - .active[wiring] ] .right-column[
] .ribbon[?] ??? questions (Why ribbon is not visible?) --- template: title # Keyboard ??? [time] 13 ; 30 --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[ ### arduino micro - USB support ### C++11 ] --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? general flow --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? flow in c++ --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? for each row: Get current and previous state. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? get row --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? Rows and Cols are just arrays. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? Set row 'active'. Wait some time to stabilize. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? for each pin in row: Read pin state and store it. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? Disable row. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? return --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? for each column: Get current and previous bit state. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? If state changed: execute update. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? User row and col to index array. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? Just a big array of function pointers. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? User stateless lambda as a function. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? Store new row value. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? HID description, standard one (8 bytes) to work under bios. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? header --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? first byte - modifiers * ctrl * alt * shift * 'GUI' (a.ka. Windows key) * times 2: left and right --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? reserved --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? 6 bytes for keys not ASCII limits max keys number --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? in c++ --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? Updating state. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? Check all 6 keys slots. If pressed - return. Look for first empty slot. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? Remove from keys if pressed. Don't need to colapse empty in the middle. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? Modifiers are just bit mask - set or unset. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] ??? Send report (with arduinos HID class). It is just a raw data. --- .left-column[ ### 60% ### black ### mechanical ### .active[keyboard] ] .right-column[  ] .ribbon[?] --- template: title # Crow --- .left-column[ ### 60% ### black ### mechanical ### keyboard ### .active[crow] ] .right-column[    ] ??? layers - like function keys --- .left-column[ ### 60% ### black ### mechanical ### keyboard ### .active[crow] ] .right-column[    ] ??? Layers keys instead of ctrls. Ctrl instead of capslock. --- .left-column[ ### 60% ### black ### mechanical ### keyboard ### .active[crow] ] .right-column[    ] ??? vim hjkl --- .left-column[ ### 60% ### black ### mechanical ### keyboard ### .active[crow] ] .right-column[    ] ??? * End - A * Del - x * Insert - R --- .left-column[ ### 60% ### black ### mechanical ### keyboard ### .active[crow] ] .right-column[    ] ??? mouse --- .left-column[ ### 60% ### black ### mechanical ### keyboard ### .active[crow] ] .right-column[    ] ??? customer report (media) --- class: middle, center, title # questions? .ribbon[?] --- template: title # Thanks --- class: title ## colors: [gruvbox](http://github.com/morhetz/gruvbox) ## layouts: [keyboards layout editor](http://www.keyboard-layout-editor.com) (+[vim](http://www.vim.org), +[inkscape](https://inkscape.org)) ## images: [falbatech](http://falbatech.pl) and [internet](http://google.com)