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

@ -7,7 +7,7 @@ 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
*/
#include "../MS_sculpt_mobile/babblePaste.h"
#include "babblePaste.h"
#include "action_macro.h"

View file

@ -9,7 +9,7 @@ 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"

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,4 +1,4 @@
#include "../../MS_sculpt_mobile.h"
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
@ -17,35 +17,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ---------------------------------------------------------------------------------
*/
[0] = KEYMAP( \
[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_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_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_SPACE, KC_RALT, RSFT(KC_1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
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,7 +1,4 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../../MS_sculpt_mobile/config.h"
#pragma once
#define USE_BABLPASTE
@ -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).