1
0
Fork 0

handwired/MS_sculpt_mobile Refactor, Configurator and cleanup (#4576)

* handwired/MS_sculpt_mobile: refactor

- layout macro KEYMAP renamed to LAYOUT
- layout macro MATRIX_TESTING_KEYMAP renamed to MATRIX_TESTING_LAYOUT

* handwired/MS_sculpt_mobile: Configurator support

* handwired/MS_sculpt_mobile: readme cleanup

* handwired/MS_sculpt_mobile: rename folder

Renamed the directory to fully lowercase.

* handwired/MS_sculpt_mobile: rename keyboard files

Renamed the keyboard core files to fully lowercase.

* handwired/ms_sculpt_mobile: keymap readme cleanup

Capitalization fixes because I'm that guy.

* handwired/ms_sculpt_mobile: keymap config.h fixes

Keymap config.h files updated to use #pragma once

* handwired/ms_sculpt_mobile: updated paths

Fixing path references due to rename.
This commit is contained in:
noroadsleft 2018-12-07 16:48:03 -08:00 committed by MechMerlin
parent 7749f4590f
commit c9159effc0
22 changed files with 275 additions and 217 deletions

View file

@ -1 +0,0 @@
#include "MS_sculpt_mobile.h"

View file

@ -1,8 +0,0 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../../MS_sculpt_mobile/config.h"
// place overrides here
#endif

View file

@ -1 +0,0 @@
# The default keymap for microsoft-sculpt-mobile

View file

@ -1 +0,0 @@
# A more programmer oriented keymap for microsoft-sculpt-mobile

View file

@ -1,58 +0,0 @@
This is a way to take a Microsoft ergonomic bluetooth keyboard, and make it
into a hard-wired keyboard running QMK.
The keyboard is known under several different names:
Mobile Bluetooth 5000, Mobile 6000, Sculpt mobile, and Asus rebranded
I had a stack of them,since they're cheap on ebay, travel well, and are just ergo enough.
The ribbon cable is 1mm pitch, which is hard to hand solder. I bought a cheap set of
"pitch adapter" boards https://www.amazon.com/Double-Sided-0-4mm-1-0-Adapter-60mmx38mm/dp/B00OK42118
Cut the original ribbon cable sockets off the bluetooth board using a razor, they're hard to desolder.
They're also allow the cable to be inserted on top or bottom.
If I was going to do it again, I'd make the MCU connection come out the top of the keyboard
and avoid the wires dangling out the bottom.
As I was debugging the matrix, I started to get random failures. In desparation I tried a second MCU,
but had the same problems. It turns out that the ribbon cable connections can get worn. Shave a
half millimeter off the end of the ribbon cable & the errors go away.
My method for discovering the matrix was to set up a KEYMAP macro that included all pins.
See MATRIX_TESTING_KEYMAP if you need it. Then set up a keymap that has all printable symbols
in the first 4 rows. test each key & record output. Then switch the printable symbols to the
bottom 4 rows & repeat. This was enough to show the matrix.
The full original keymap for the sculpt is
A B C D E F G H --->
0 b n m , . /
1 g h "
2 7 8 9 0 Del PgUp
3 p [ ] \
4 y u i o
5 ~ - += j k l ; 5
6 a s d q w e, Up left
7 F7 F8 F9 F10 F11 F12 f
-----> I J K L M N O P Q R
0 Caps FN
1 Vol+ mute Rctl vol- pgdn LCTL
2 Rshift LShift
3 Ralt LAlt
4 LGUI
5 6 bakspc 1 2 3 4 F4 F5 F6
6 Down right spc F1 F2 F3 tab
7 r t z x c v enter Esc
This works with 18 cols + 8 rows on a Teensy++, or Arm based Teensy.
The Astar mini has all pins exposed , so you can do 18x8
If you want a speaker, LEDs &etc, you'll need to free up a pin. I recommend joining columns
R and L to the same pin.
Building - add ASTAR=1 to the compile line or leave out for teensy2++

View file

@ -1,13 +1,13 @@
/* A library to output the right key shortcut in any common app.
Given a global variable babble_mode to show the environment and a
key that calls the paste macro, do the right type of paste.
Setting the context is done by another macro, or TBD interaction with the host.
/* A library to output the right key shortcut in any common app.
Given a global variable babble_mode to show the environment and a
key that calls the paste macro, do the right type of paste.
Setting the context is done by another macro, or TBD interaction with the host.
Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
*/
#include "../MS_sculpt_mobile/babblePaste.h"
#include "babblePaste.h"
#include "action_macro.h"
@ -16,14 +16,14 @@ and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jee
// GLOBAL variable to determine mode. Sets startup default if no eeppom
uint8_t babble_mode =0 ;
// small function that we might also want to call from a keymap.
// small function that we might also want to call from a keymap.
macro_t* switch_babble_mode( uint8_t id) {
babble_mode= id;
return MACRO_NONE; //less typing where called
}
// Today I learned that the preprocessor can not create a switch statement label from an argument
// And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15
#define BABLM(ent, macro...) \
@ -32,8 +32,8 @@ macro_t* switch_babble_mode( uint8_t id) {
/* this function runs the appropriate babblepaste macro, given
the global babble_mode, and a shortcut from the ENUM in babblePaste.h
TODO, the pointers in this function should be stored in a PROGMEM array, not ram.
the global babble_mode, and a shortcut from the ENUM in babblePaste.h
TODO, the pointers in this function should be stored in a PROGMEM array, not ram.
But that requires even more clever preprocessor foo.
*/
const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
@ -43,20 +43,20 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
return MACRO_NONE;
}
*/
#ifdef MS_MODE
if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); }
#endif
if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); }
#endif
#ifdef MAC_MODE
if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); }
if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); }
#endif
#ifdef LINUX_MODE
if ( BABL_LINUX == shortcut ) { return switch_babble_mode(LINUX_MODE); }
#endif
#endif
#ifdef READMUX_MODE
if ( BABL_READLINE == shortcut ) { switch_babble_mode(READMUX_MODE); return MACRO_NONE; }
#endif
#endif
#ifdef VI_MODE
if ( BABL_VI == shortcut ) { return switch_babble_mode(VI_MODE); }
#endif
@ -66,11 +66,11 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
switch(babble_mode) {
switch(babble_mode) {
#ifdef MS_MODE
case MS_MODE:
case MS_MODE:
BABLM( BABL_GO_LEFT_1C, T(LEFT), END );
BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
BABLM( BABL_GO_LEFT_WORD, D(LCTL), T(LEFT), U(LCTL), END );
@ -93,7 +93,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_REDO, D(LCTL), T(Y), U(LCTL), END );
BABLM( BABL_CUT, D(LCTL), T(X), U(LCTL), END );
BABLM( BABL_COPY, D(LCTL), T(C), U(LCTL), END );
BABLM( BABL_PASTE, D(LCTL), T(V), U(LCTL), END );
BABLM( BABL_PASTE, D(LCTL), T(V), U(LCTL), END );
BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
BABLM( BABL_FIND_NEXT, T(F3),END );
@ -114,7 +114,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_BROWSER_BACK, D(LALT), T(LEFT), U(LALT),END );
BABLM( BABL_BROWSER_FIND, D(LCTL), T(F), U(LCTL),END );
BABLM( BABL_BROWSER_BOOKMARK, D(LCTL), T(D), U(LCTL),END );
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LCTL),END ); // EDGE
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LCTL),END ); // EDGE
BABLM( BABL_BROWSER_DEV_TOOLS, D(LCTL), T(T), U(LCTL),END ); // Chrome
// Chrome
BABLM( BABL_BROWSER_RELOAD, D(LCTL), T(F5), U(LCTL),END ); // hard reload w/o cache
@ -126,8 +126,8 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
// Todo, ring bell, flash light, show user this isn't supported
return MACRO_NONE;
#endif /* MS_MODE*/
@ -146,7 +146,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_GO_PREV_LINE , T(UP), END );
BABLM( BABL_PGDN , T(PGDN), END );
BABLM( BABL_PGUP , T(PGUP), END );
BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
BABLM( BABL_DEL_RIGHT_WORD , D(LCTL), T(DEL), U(LCTL), END );
BABLM( BABL_DEL_TO_LINE_END, D(RSFT), T(HOME), U(RSFT), T(DEL), END);
@ -156,8 +156,8 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_REDO , D(LCTL), T(Y), U(LCTL), END );
BABLM( BABL_CUT , D(LCTL), T(X), U(LCTL), END );
BABLM( BABL_COPY , D(LCTL), T(C), U(LCTL), END );
BABLM( BABL_PASTE , D(LCTL), T(V), U(LCTL), END );
BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
BABLM( BABL_PASTE , D(LCTL), T(V), U(LCTL), END );
BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
/* BABLM(BABL_FIND_NEXT , T(F3),END ); KDE */
BABLM( BABL_FIND_NEXT, D(LCTL),T(G), U(LCTL),END ); // Gnome*/
@ -167,7 +167,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_SWITCH_APP_NEXT, D(LCTL),T(TAB), U(LCTL),END );
BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END );
BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END );
//BABLM( BABL_HELP, END );
//BABLM( BABL_HELP, END );
#ifndef BABL_NOBROWSER
BABLM( BABL_BROWSER_NEW_TAB, D(LCTL), T(T), U(LCTL),END );
@ -188,9 +188,9 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
#endif
#endif
return MACRO_NONE;
#endif
#endif
#ifdef MAC_MODE
case MAC_MODE:
@ -206,7 +206,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_GO_PREV_LINE , T(UP), END );
BABLM( BABL_PGDN , D(LALT),T(DOWN), U(LALT), END );
BABLM( BABL_PGUP , D(LALT),T(UP), U(LALT), END );
BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
BABLM( BABL_DEL_LEFT_WORD , D(LALT), T(BSPACE), U(LALT), END );
BABLM( BABL_DEL_RIGHT_WORD, D(LALT), T(DEL), U(LALT), END );
BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );// there must be another way
@ -216,7 +216,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_REDO , D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END );
BABLM( BABL_CUT , D(LGUI), T(X), U(LGUI), END );
BABLM( BABL_COPY , D(LGUI), T(C), U(LGUI), END );
BABLM( BABL_PASTE , D(LGUI), T(V), U(LGUI), END );
BABLM( BABL_PASTE , D(LGUI), T(V), U(LGUI), END );
BABLM( BABL_SELECT_ALL , D(LGUI), T(A), U(LGUI), END );
BABLM( BABL_FIND , D(LGUI),T(F), U(LGUI),END );
BABLM( BABL_FIND_NEXT, D(LGUI),T(G), U(LGUI),END );
@ -238,7 +238,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
// Chrome
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
@ -247,10 +247,10 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
#endif
#endif
return MACRO_NONE;
#endif
#endif
#ifdef EMACS_MODE
case EMACS_MODE:
@ -269,18 +269,18 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
BABLM( BABL_PGDN , D(LCTL), T(V), U(LCTL), END );
BABLM( BABL_PGUP , D(LALT), T(V), U(LALT), END );
BABLM( BABL_DEL_RIGHT_1C, D(LCTL), T(D), U(LCTL),END );
BABLM( BABL_DEL_RIGHT_1C, D(LCTL), T(D), U(LCTL),END );
BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
BABLM( BABL_DEL_TO_LINE_START, T(ESC), T(0), D(LCTL), T(K), U(LCTL), END );
#ifndef BABL_MOVEMENTONLY
BABLM( BABL_UNDO , D(LCTL), T(X), U(LCTL),T(C), END );
BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
BABLM( BABL_CUT , D(LCTL), T(W), U(LCTL), END );
BABLM( BABL_COPY , D(LALT), T(W), U(LALT), END ); //really?
BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
BABLM( BABL_SELECT_ALL ,D(LCTL), T(X), U(LCTL),T(H), END );
BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
BABLM( BABL_SELECT_ALL ,D(LCTL), T(X), U(LCTL),T(H), END );
BABLM( BABL_FIND , D(LCTL), T(S), U(LCTL),END );
BABLM( BABL_FIND_NEXT , D(LCTL), T(S), U(LCTL),END );
BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
@ -290,7 +290,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_CLOSE_APP , D(LCTL), T(X), U(LCTL),T(C),END );
BABLM( BABL_HELP , D(LCTL),T(H), U(LCTL),T(A),END); // start search in help
#ifndef BABL_NOBROWSER
/* you get to figure w3 out
/* you get to figure w3 out
BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
@ -301,7 +301,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
// Chrome
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
@ -312,18 +312,18 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
#endif
#endif
break;
return MACRO_NONE;
}
#endif
#endif
#ifdef VI_MODE
case VI_MODE:
// you have to track the modes yourself. Otherwise motion is awful (bell, bell, bell)
BABLM( BABL_GO_LEFT_1C , T(H), END );
BABLM( BABL_GO_RIGHT_1C , T(L), END );
BABLM( BABL_GO_LEFT_WORD , T(B),END );
@ -336,18 +336,18 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_GO_PREV_LINE, T(K), END );
BABLM( BABL_PGDN ,D(LCTL), T(F), U(LCTL), END );
BABLM( BABL_PGUP , D(LCTL), T(B), U(LCTL), END );
BABLM( BABL_DEL_RIGHT_1C , T(X),END );
BABLM( BABL_DEL_RIGHT_1C , T(X),END );
BABLM( BABL_DEL_LEFT_WORD , T(D),T(G),T(E),END );
BABLM( BABL_DEL_RIGHT_WORD , T(D),T(W),END );
BABLM( BABL_DEL_TO_LINE_END, T(D),D(LSFT), T(4),U(LSFT) ,END ); // d$
BABLM( BABL_DEL_TO_LINE_START, T(D),D(LSFT), T(6),U(LSFT) ,END );
BABLM( BABL_DEL_TO_LINE_START, T(D),D(LSFT), T(6),U(LSFT) ,END );
#ifndef BABL_MOVEMENTONLY
BABLM( BABL_UNDO , T(U), END );
BABLM( BABL_REDO , D(LCTL), T(R), U(LCTL), END );
BABLM( BABL_REDO , D(LCTL), T(R), U(LCTL), END );
BABLM( BABL_CUT , T(X), END );
BABLM( BABL_COPY , T(Y),END );
BABLM( BABL_PASTE , T(P), END );
BABLM( BABL_SELECT_ALL , D(LSFT), T(SCLN),U(LSFT),D(LSFT), T(5),U(LSFT),T(Y), END ); // wrong but helpful?
BABLM( BABL_PASTE , T(P), END );
BABLM( BABL_SELECT_ALL , D(LSFT), T(SCLN),U(LSFT),D(LSFT), T(5),U(LSFT),T(Y), END ); // wrong but helpful?
BABLM( BABL_FIND , T(SLASH),END );
BABLM( BABL_FIND_NEXT , T(N),END );
BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
@ -357,7 +357,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM(BABL_CLOSE_APP, D(LSFT), T(SCLN),U(LSFT), T(Q), D(RSFT), T(1),U(RSFT), END );
BABLM(BABL_HELP, D(LSFT), T(SCLN),U(LSFT),T(H),END); // start search in help
#ifndef BABL_NOBROWSER
/* you get to figure this out
/* you get to figure this out
BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
@ -368,7 +368,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
// Chrome
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
@ -377,8 +377,8 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
*/
#endif
#endif
return MACRO_NONE;
#endif
return MACRO_NONE;
#endif
@ -387,10 +387,10 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
#ifdef READMUX_MODE
// Readline command line editing + tmux windowing
// I havent decided how much to do readline and how much tmux
case READMUX_MODE:
case READMUX_MODE:
BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
BABLM( BABL_GO_LEFT_WORD , D(LALT), T(B), U(LALT), END );
@ -403,28 +403,28 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
BABLM( BABL_PGDN , T(PGDN), END );
BABLM( BABL_PGUP , T(PGUP), END );
BABLM( BABL_DEL_RIGHT_1C , D(LCTL), T(D), U(LCTL),END );
BABLM( BABL_DEL_RIGHT_1C , D(LCTL), T(D), U(LCTL),END );
BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(W), U(LCTL), END );
BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
BABLM( BABL_DEL_TO_LINE_START, D(LCTL), T(U), U(LCTL), END );
#ifndef BABL_MOVEMENTONLY
BABLM( BABL_UNDO , D(LALT), T(R), U(LALT) , END );
BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
BABLM( BABL_CUT , D(LCTL), T(K), U(LCTL), END ); // wrong half the time
//BABLM( BABL_COPY ,END );
BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
BABLM( BABL_SELECT_ALL , D(LCTL), T(A), T(K), T(Y), U(LCTL) , END );
//BABLM( BABL_COPY ,END );
BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
BABLM( BABL_SELECT_ALL , D(LCTL), T(A), T(K), T(Y), U(LCTL) , END );
BABLM( BABL_FIND , D(LCTL), T(R), U(LCTL), END ); // search history
BABLM(BABL_FIND_NEXT, D(LCTL), T(S), U(LCTL), END );
//BABLM( BABL_FIND_REPLACE ,END );
//BABLM( BABL_FIND_REPLACE ,END );
BABLM( BABL_RUNAPP , D(LCTL), T(B), U(LCTL), T(C),END ); //tmux
BABLM( BABL_SWITCH_APP_NEXT , D(LCTL), T(B), U(LCTL), T(N),END ); //tmux
BABLM( BABL_SWITCH_APP_LAST , D(LCTL), T(B), U(LCTL), T(P),END ); //tmux
BABLM( BABL_CLOSE_APP , D(LCTL), T(B), U(LCTL), T(D),END); // usually what I want
// BABLM( BABL_HELP ,END );
// BABLM( BABL_HELP ,END );
#ifndef BABL_NOBROWSER
/* Add lynx shortcuts?
/* Add lynx shortcuts?
BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
@ -435,7 +435,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
// Chrome
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
@ -445,12 +445,12 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
*/
#endif
#endif
return MACRO_NONE;
#endif
default:
return MACRO_NONE;
#endif
default:
return MACRO_NONE;
}

View file

@ -1,15 +1,15 @@
/* A library to output the right key shortcut in any common app.
Given a global variable babble_mode to show the environment and a
key that calls the paste macro, do the right type of paste.
/* A library to output the right key shortcut in any common app.
Given a global variable babble_mode to show the environment and a
key that calls the paste macro, do the right type of paste.
Setting the bable_mode is done by another macro, or TBD interaction with the host.
Setting the bable_mode is done by another macro, or TBD interaction with the host.
Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
and jeebak & algernon's keymap
*/
#ifndef _babblePaste_h_included__
#define _babblePaste_h_included__
#include "../MS_sculpt_mobile/config.h"
#include "config.h"
#include "action_layer.h"
#include "quantum_keycodes.h"
@ -18,11 +18,11 @@ and jeebak & algernon's keymap
/* ***************************
// Uncomment any modes you want. Whatever mode = 0 will be the default on boot
// Expect to get errors if you comment a feature out and leave it in your keymap.
// Expect to get errors if you comment a feature out and leave it in your keymap.
#define USE_BABLPASTE
//#define MS_MODE 0 // Windows.
//#define MS_MODE 0 // Windows.
//#define MAC_MODE 1
//#define LINUX_MODE 2 //aka gnome+KDE
//#define EMACS_MODE 3
@ -42,7 +42,7 @@ and jeebak & algernon's keymap
//#define BABL_MOVEMENTONLY
// Define starting number for BABL macros in the macro range.
// Define starting number for BABL macros in the macro range.
// Probably can start the default even lower
#define BABL_START_NUM 50
@ -53,7 +53,7 @@ enum {
// left & right
BABL_GO_LEFT_1C= BABL_START_NUM,
BABL_GO_RIGHT_1C,
BABL_GO_LEFT_WORD,
BABL_GO_LEFT_WORD,
BABL_GO_RIGHT_WORD,
BABL_GO_START_LINE,
BABL_GO_END_LINE,
@ -65,7 +65,7 @@ enum {
BABL_PGDN,
BABL_PGUP,
// And the delete options
//BABL_DEL_LEFT_1C == backspace, so why bother.
//BABL_DEL_LEFT_1C == backspace, so why bother.
BABL_DEL_RIGHT_1C, // usually = Del
BABL_DEL_LEFT_WORD,
BABL_DEL_RIGHT_WORD,
@ -110,7 +110,7 @@ enum {
BABL_BROWSER_FULLSCREEN,
BABL_BROWSER_ZOOM_IN,
BABL_BROWSER_ZOOM_OUT,
#endif
#endif
@ -137,8 +137,8 @@ enum {
};
// BUG, used to jump to babble functiion. Surely there is a way to calculate size of enum?
#define BABL_NUM_MACROS 48+4 // 48 + # of defined modes.
// BUG, used to jump to babble functiion. Surely there is a way to calculate size of enum?
#define BABL_NUM_MACROS 48+4 // 48 + # of defined modes.
/* And all the shorthand keymap ready versions */
// First the mode switching macros
@ -161,7 +161,7 @@ enum {
#define B_READ M(BABL_READLINE)
#endif
// and all the movement & action.
// and all the movement & action.
#define B_L1C M(BABL_GO_LEFT_1C)
#define B_R1C M(BABL_GO_RIGHT_1C)
@ -175,7 +175,7 @@ enum {
#define B_UP M(BABL_GO_PREV_LINE)
#define B_PGDN M(BABL_PGDN)
#define B_PGUP M(BABL_PGUP)
//#define B_BKSP M(BABL_DEL_LEFT_1C) == backspace so why bother.
//#define B_BKSP M(BABL_DEL_LEFT_1C) == backspace so why bother.
#define B_DEL M(BABL_DEL_RIGHT_1C) // usually = Del
#define B_DLW M(BABL_DEL_LEFT_WORD)
#define B_DRW M(BABL_DEL_RIGHT_WORD)
@ -210,8 +210,8 @@ enum {
#define B_BFUlL M(BABL_BROWSER_FULLSCREEN)
#define B_ZMIN M(BABL_BROWSER_ZOOM_IN)
#define B_ZMOT M(BABL_BROWSER_ZOOM_OUT)

View file

@ -0,0 +1,96 @@
{
"keyboard_name": "MS Sculpt Mobile",
"url": "",
"maintainer": "qmk",
"width": 16,
"height": 6,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"Esc", "x":0, "y":0},
{"label":"F1", "x":1, "y":0},
{"label":"F2", "x":2, "y":0},
{"label":"F3", "x":3, "y":0},
{"label":"F4", "x":4, "y":0},
{"label":"F5", "x":5, "y":0},
{"label":"F6", "x":6, "y":0},
{"label":"F7", "x":7, "y":0},
{"label":"F8", "x":8, "y":0},
{"label":"F9", "x":9, "y":0},
{"label":"F10", "x":10, "y":0},
{"label":"F11", "x":11, "y":0},
{"label":"F12", "x":12, "y":0},
{"label":"PrtSc", "x":13, "y":0},
{"label":"Home", "x":14, "y":0},
{"label":"End", "x":15, "y":0},
{"label":"`", "x":0, "y":1},
{"label":"1", "x":1, "y":1},
{"label":"2", "x":2, "y":1},
{"label":"3", "x":3, "y":1},
{"label":"4", "x":4, "y":1},
{"label":"5", "x":5, "y":1},
{"label":"6", "x":6, "y":1},
{"label":"7", "x":7, "y":1},
{"label":"8", "x":8, "y":1},
{"label":"9", "x":9, "y":1},
{"label":"0", "x":10, "y":1},
{"label":"-", "x":11, "y":1},
{"label":"=", "x":12, "y":1},
{"label":"Backspace", "x":13, "y":1, "w":2},
{"label":"Del", "x":15, "y":1, "h":1.6},
{"label":"Tab", "x":0, "y":2, "w":1.5},
{"label":"Q", "x":1.5, "y":2},
{"label":"W", "x":2.5, "y":2},
{"label":"E", "x":3.5, "y":2},
{"label":"R", "x":4.5, "y":2},
{"label":"T", "x":5.5, "y":2},
{"label":"Y", "x":6.5, "y":2},
{"label":"U", "x":7.5, "y":2},
{"label":"I", "x":8.5, "y":2},
{"label":"O", "x":9.5, "y":2},
{"label":"P", "x":10.5, "y":2},
{"label":"[", "x":11.5, "y":2},
{"label":"]", "x":12.5, "y":2},
{"label":"\\", "x":13.5, "y":2, "w":1.5},
{"label":"Caps Lock", "x":0, "y":3, "w":1.75},
{"label":"A", "x":1.75, "y":3},
{"label":"S", "x":2.75, "y":3},
{"label":"D", "x":3.75, "y":3},
{"label":"F", "x":4.75, "y":3},
{"label":"G", "x":5.75, "y":3},
{"label":"H", "x":6.75, "y":3},
{"label":"J", "x":7.75, "y":3},
{"label":"K", "x":8.75, "y":3},
{"label":"L", "x":9.75, "y":3},
{"label":";", "x":10.75, "y":3},
{"label":"'", "x":11.75, "y":3},
{"label":"Enter", "x":12.75, "y":3, "w":2.25},
{"label":"PgUp", "x":15, "y":2.6, "h":1.2},
{"label":"LShift", "x":0, "y":4, "w":2.25},
{"label":"Z", "x":2.25, "y":4},
{"label":"X", "x":3.25, "y":4},
{"label":"C", "x":4.25, "y":4},
{"label":"V", "x":5.25, "y":4},
{"label":"B", "x":6.25, "y":4},
{"label":"N", "x":7.25, "y":4},
{"label":"M", "x":8.25, "y":4},
{"label":",", "x":9.25, "y":4},
{"label":".", "x":10.25, "y":4},
{"label":"/", "x":11.25, "y":4},
{"label":"RShift", "x":12.25, "y":4, "w":1.75},
{"label":"Up", "x":14, "y":4},
{"label":"PgDn", "x":15, "y":3.8, "h":1.2},
{"label":"LCtrl", "x":0, "y":5, "w":1.25},
{"label":"LWin", "x":1.25, "y":5, "w":1.25},
{"label":"LAlt", "x":2.5, "y":5, "w":1.25},
{"label":"Space", "x":3.75, "y":5, "w":5.5},
{"label":"RAlt", "x":9.25, "y":5, "w":1.25},
{"label":"Fn", "x":10.5, "y":5, "w":1.25},
{"label":"RCtrl", "x":11.75, "y":5, "w":1.25},
{"label":"Left", "x":13, "y":5},
{"label":"Down", "x":14, "y":5},
{"label":"Right", "x":15, "y":5}
]
}
}
}

View file

@ -0,0 +1,3 @@
#pragma once
// place overrides here

View file

@ -1,7 +1,7 @@
#include "../../MS_sculpt_mobile.h"
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
/*
*
* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|Mute|
* -------------------------------------------------------------------------------'
@ -10,42 +10,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |
* -------------------------------------------------------------------------------'
* | caps | a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp|
* --------------------------------------------------------------------------------
* --------------------------------------------------------------------------------
* |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn|
* ---------------------------------------------------------------------------------
* ---------------------------------------------------------------------------------
* |Lctl |Lgui |Lalt | Space |Ralt | FN | Rctl |Left|Down|Rght|
* ---------------------------------------------------------------------------------
* ---------------------------------------------------------------------------------
*/
[0] = KEYMAP( \
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_VOLU, KC_MUTE,\
KC_GRAVE, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,\
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,\
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,\
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, RSFT(KC_1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
)
[0] = LAYOUT( \
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_VOLU, KC_MUTE, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, RSFT(KC_1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
)
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};
void matrix_init_user(void) {

View file

@ -0,0 +1 @@
# The default keymap for Microsoft Sculpt Mobile

View file

@ -1,23 +1,20 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../../MS_sculpt_mobile/config.h"
#pragma once
#define USE_BABLPASTE
// Expect to get errors if you comment a feature out and leave it in your keymap.
// Expect to get errors if you comment a feature out and leave it in your keymap.
#ifdef USE_BABLPASTE
//define BabblePaste maps
// Windows.
// Windows.
#define MAC_MODE 0
#define MS_MODE 1
//aka gnome+KDE
//#define LINUX_MODE 2
//#define LINUX_MODE 2
//#define EMACS_MODE 3
#define VI_MODE 3
// Readline and tmux
#define READMUX_MODE 2
#define READMUX_MODE 2
//#define WORDSTAR_MODE 5
#endif
@ -29,4 +26,3 @@
//#define BABL_NOBROWSER
// place overrides here
#endif

View file

@ -1,11 +1,5 @@
#include "../../../MS_sculpt_mobile/babblePaste.h"
#include "../../MS_sculpt_mobile.h"
#include "action_layer.h"
#include "action_util.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
#include "babblePaste.h"
#include QMK_KEYBOARD_H
#define _QWR 0
#define _CDH 2
@ -59,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ---------------------------------------------------------------------------------
*/
[_QWR] = KEYMAP( \
[_QWR] = LAYOUT( \
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_VOLU, CDH,\
KC_ESC, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,\
@ -68,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_FN1, KC_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
[_CDH] = KEYMAP (\
[_CDH] = LAYOUT(\
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, QWR, \
KC_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\
@ -95,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ---------------------------------------------------------------------------------
*/
[_SYM] = KEYMAP (\
[_SYM] = LAYOUT(\
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
M(VIBRK), KC_CIRC, KC_LCBR, KC_RCBR,KC_AT, KC_PERC, ____, KC_LBRC,KC_LPRN,KC_RPRN,KC_UNDS, ____, ____, ____,\
@ -118,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ---------------------------------------------------------------------------------
*/
[_MOV] = KEYMAP (\
[_MOV] = LAYOUT(\
____, B_MAC,B_WIN,B_READ, B_VI, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
____, ____, B_PAPP, B_NAPP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
____, B_UNDO, ____, B_BFND, ____, B_PTAB, B_DSOL, B_DLW, B_UP, B_DRW, B_DEOL, ____, ____, ____, \
@ -127,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
____, ____, ____, ____, ____, ____, ____, ____, ____, ____
),
[_TRAN] = KEYMAP (\
[_TRAN] = LAYOUT(\
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \

View file

@ -0,0 +1 @@
# A more programmer oriented keymap for Microsoft Sculpt Mobile

View file

@ -0,0 +1 @@
#include "ms_sculpt_mobile.h"

View file

@ -4,7 +4,7 @@
#include "quantum.h"
#define KEYMAP( \
#define LAYOUT( \
k7Q, k6O, k6P, k6Q, k5O, k5P, k5Q, k7A, k7B, k7C, k7D, k7E, k7F, k1O, k1K, k1L, \
k5A, k5K, k5L, k5M, k5N, k5H, k5I, k2A, k2B, k2C, k2D, k5B, k5C, k5J, k2E, \
k6R, k6D, k6E, k6F, k7I, k7J, k4A, k4B, k4C, k4D, k3A, k3B, k3C, k3D, \
@ -24,7 +24,7 @@
}
#define MATRIX_TESTING_KEYMAP( \
#define MATRIX_TESTING_LAYOUT( \
k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q,\
k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q,\
k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q,\

View file

@ -0,0 +1,55 @@
# Microsoft Sculpt Mobile
This is a way to take a Microsoft ergonomic bluetooth keyboard, and make it
into a hard-wired keyboard running QMK.
The keyboard is known under several different names:
Mobile Bluetooth 5000, Mobile 6000, Sculpt mobile, and Asus rebranded.
I had a stack of them, since they're cheap on ebay, travel well, and are just ergo enough.
The ribbon cable is 1mm pitch, which is hard to hand solder. I bought a cheap set of
"pitch adapter" boards https://www.amazon.com/Double-Sided-0-4mm-1-0-Adapter-60mmx38mm/dp/B00OK42118
Cut the original ribbon cable sockets off the bluetooth board using a razor, they're hard to desolder.
They're also allow the cable to be inserted on top or bottom.
If I was going to do it again, I'd make the MCU connection come out the top of the keyboard
and avoid the wires dangling out the bottom.
As I was debugging the matrix, I started to get random failures. In desparation I tried a second MCU,
but had the same problems. It turns out that the ribbon cable connections can get worn. Shave a
half millimeter off the end of the ribbon cable & the errors go away.
My method for discovering the matrix was to set up a LAYOUT macro that included all pins.
See MATRIX_TESTING_LAYOUT if you need it. Then set up a keymap that has all printable symbols
in the first 4 rows. test each key & record output. Then switch the printable symbols to the
bottom 4 rows & repeat. This was enough to show the matrix.
The full original keymap for the Sculpt is
| | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R |
|:-:|:--:|:--:|:--:|:---:|:---:|:---:|:----:|:----:|:----:|:-----:|:----:|:------:|:----:|:-----:|:----:|:------:|:----:|:---:|
| 0 | b | n | m | , | . | / | | | | Caps | | | | | | | | Fn |
| 1 | g | h | " | | | | | | | | Vol+ | Mute | RCtl | | Vol- | PgDn | LCtl | |
| 2 | 7 | 8 | 9 | 0 | Del | | PgUp | | | | | RShift | | | | LShift | | |
| 3 | p | [ | ] | \ | | | | | | | RAlt | | | | LAlt | | | |
| 4 | y | u | i | o | | | | | | | | | | LGUI | | | | |
| 5 | ~ | - | += | j | k | l | ; | 5 | 6 | Bksp | 1 | 2 | 3 | 4 | F4 | F5 | F6 | |
| 6 | a | s | d | q | w | e | Up | Left | Down | Right | | | | Space | F1 | F2 | F3 | Tab |
| 7 | F7 | F8 | F9 | F10 | F11 | F12 | | f | r | t | z | x | c | | v | Enter | Esc | |
This works with 18 cols + 8 rows on a Teensy++, or ARM-based Teensy.
The Astar mini has all pins exposed , so you can do 18x8
If you want a speaker, LEDs, etc., you'll need to free up a pin. I recommend joining columns
R and L to the same pin.
Building - add ASTAR=1 to the compile line or leave out for teensy2++
Make example for this keyboard (after setting up your build environment):
make handwired/ms_sculpt_mobile:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).