Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: ibmpc_usb lock state indicators on converter itself #3

Open
wants to merge 8 commits into
base: vial-qmk-with-ibmpc-usb-converter
Choose a base branch
from
1 change: 0 additions & 1 deletion keyboards/converter/ibmpc_usb/atmega32u2_atmel_dfu/ibmpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ int16_t ibmpc_host_send(uint8_t data);
int16_t ibmpc_host_recv_response(void);
int16_t ibmpc_host_recv(void);
void ibmpc_host_isr_clear(void);
void ibmpc_host_set_led(uint8_t usb_led);


/*--------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ int16_t ibmpc_host_send(uint8_t data);
int16_t ibmpc_host_recv_response(void);
int16_t ibmpc_host_recv(void);
void ibmpc_host_isr_clear(void);
void ibmpc_host_set_led(uint8_t usb_led);


/*--------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion keyboards/converter/ibmpc_usb/atmega32u4_atmel_dfu/ibmpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ int16_t ibmpc_host_send(uint8_t data);
int16_t ibmpc_host_recv_response(void);
int16_t ibmpc_host_recv(void);
void ibmpc_host_isr_clear(void);
void ibmpc_host_set_led(uint8_t usb_led);


/*--------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ int16_t ibmpc_host_send(uint8_t data);
int16_t ibmpc_host_recv_response(void);
int16_t ibmpc_host_recv(void);
void ibmpc_host_isr_clear(void);
void ibmpc_host_set_led(uint8_t usb_led);


/*--------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion keyboards/converter/ibmpc_usb/atmega32u4_caterina/ibmpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ int16_t ibmpc_host_send(uint8_t data);
int16_t ibmpc_host_recv_response(void);
int16_t ibmpc_host_recv(void);
void ibmpc_host_isr_clear(void);
void ibmpc_host_set_led(uint8_t usb_led);


/*--------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion keyboards/converter/ibmpc_usb/atmega32u4_halfkay/ibmpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ int16_t ibmpc_host_send(uint8_t data);
int16_t ibmpc_host_recv_response(void);
int16_t ibmpc_host_recv(void);
void ibmpc_host_isr_clear(void);
void ibmpc_host_set_led(uint8_t usb_led);


/*--------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion keyboards/converter/ibmpc_usb/atmega32u4_qmk_dfu/ibmpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ int16_t ibmpc_host_send(uint8_t data);
int16_t ibmpc_host_recv_response(void);
int16_t ibmpc_host_recv(void);
void ibmpc_host_isr_clear(void);
void ibmpc_host_set_led(uint8_t usb_led);


/*--------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion keyboards/converter/ibmpc_usb/atmega32u4_qmk_hid/ibmpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ int16_t ibmpc_host_send(uint8_t data);
int16_t ibmpc_host_recv_response(void);
int16_t ibmpc_host_recv(void);
void ibmpc_host_isr_clear(void);
void ibmpc_host_set_led(uint8_t usb_led);


/*--------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ int16_t ibmpc_host_send(uint8_t data);
int16_t ibmpc_host_recv_response(void);
int16_t ibmpc_host_recv(void);
void ibmpc_host_isr_clear(void);
void ibmpc_host_set_led(uint8_t usb_led);


/*--------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions keyboards/converter/ibmpc_usb/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT_ID 0x6536
#define DEVICE_VER 0x0101
#define MANUFACTURER QMK
#define PRODUCT Legacy Keyboard Convert
#define DESCRIPTION convert IBM PC keyboard to USB
#define PRODUCT IBM keyboard protocol converter

/* matrix size */
#define MATRIX_ROWS 8
Expand Down
11 changes: 2 additions & 9 deletions keyboards/converter/ibmpc_usb/ibmpc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright 2010,2011,2012,2013,2019 Jun WAKO <[email protected]>
Copyright 2010,2011,2012,2013,2019 Jun WAKO <[email protected]>,
2023 an_achronism <[email protected]>

This software is licensed with a Modified BSD License.
All of this is supposed to be Free Software, Open Source, DFSG-free,
Expand Down Expand Up @@ -418,11 +419,3 @@ ISR(IBMPC_INT_VECT) { ibmpc_interrupt_service_routine(); }
void ibmpc_interrupt_service_routine(void);
void palCallback(void *arg) { ibmpc_interrupt_service_routine(); }
#endif

/* send LED state to keyboard */
void ibmpc_host_set_led(uint8_t led)
{
if (0xFA == ibmpc_host_send(0xED)) {
ibmpc_host_send(led);
}
}
142 changes: 138 additions & 4 deletions keyboards/converter/ibmpc_usb/info.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,144 @@
{
"keyboard_name": "converter/ibmpc_usb",
"url": "",
"maintainer": "qmk",
"keyboard_name": "IBM keyboard protocol converter",
"url": "https://github.com/purdeaandrei/vial-qmk-with-ibmpc-usb-converter",
"maintainer": "purdeaandrei",
"layouts": {
"LAYOUT": {
"layout": [{"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"x":17.25, "y":1}, {"x":19.5, "y":1}, {"x":20.5, "y":1}, {"x":21.5, "y":1}, {"x":0, "y":2.5}, {"x":1, "y":2.5}, {"x":2, "y":2.5}, {"x":3, "y":2.5}, {"x":4, "y":2.5}, {"x":5, "y":2.5}, {"x":6, "y":2.5}, {"x":7, "y":2.5}, {"x":8, "y":2.5}, {"x":9, "y":2.5}, {"x":10, "y":2.5}, {"x":11, "y":2.5}, {"x":12, "y":2.5}, {"x":13, "y":2.5}, {"x":14, "y":2.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":18.5, "y":2.5}, {"x":19.5, "y":2.5}, {"x":20.5, "y":2.5}, {"x":21.5, "y":2.5}, {"x":0, "y":3.5, "w":1.5}, {"x":1.5, "y":3.5}, {"x":2.5, "y":3.5}, {"x":3.5, "y":3.5}, {"x":4.5, "y":3.5}, {"x":5.5, "y":3.5}, {"x":6.5, "y":3.5}, {"x":7.5, "y":3.5}, {"x":8.5, "y":3.5}, {"x":9.5, "y":3.5}, {"x":10.5, "y":3.5}, {"x":11.5, "y":3.5}, {"x":12.5, "y":3.5}, {"x":13.5, "y":3.5, "w":1.5}, {"x":15.25, "y":3.5}, {"x":16.25, "y":3.5}, {"x":17.25, "y":3.5}, {"x":18.5, "y":3.5}, {"x":19.5, "y":3.5}, {"x":20.5, "y":3.5}, {"x":21.5, "y":3.5}, {"x":0, "y":4.5, "w":1.75}, {"x":1.75, "y":4.5}, {"x":2.75, "y":4.5}, {"x":3.75, "y":4.5}, {"x":4.75, "y":4.5}, {"x":5.75, "y":4.5}, {"x":6.75, "y":4.5}, {"x":7.75, "y":4.5}, {"x":8.75, "y":4.5}, {"x":9.75, "y":4.5}, {"x":10.75, "y":4.5}, {"x":11.75, "y":4.5}, {"x":12.75, "y":4.5}, {"x":13.75, "y":4.5, "w":1.25}, {"x":18.5, "y":4.5}, {"x":19.5, "y":4.5}, {"x":20.5, "y":4.5}, {"x":21.5, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5}, {"x":2.25, "y":5.5}, {"x":3.25, "y":5.5}, {"x":4.25, "y":5.5}, {"x":5.25, "y":5.5}, {"x":6.25, "y":5.5}, {"x":7.25, "y":5.5}, {"x":8.25, "y":5.5}, {"x":9.25, "y":5.5}, {"x":10.25, "y":5.5}, {"x":11.25, "y":5.5}, {"x":12.25, "y":5.5}, {"x":13.25, "y":5.5, "w":1.75}, {"x":16.25, "y":5.5}, {"x":18.5, "y":5.5}, {"x":19.5, "y":5.5}, {"x":20.5, "y":5.5}, {"x":21.5, "y":5.5}, {"x":0, "y":6.5, "w":1.25}, {"x":1.25, "y":6.5, "w":1.25}, {"x":2.5, "y":6.5, "w":1.25}, {"x":3.75, "y":6.5, "w":1.25}, {"x":5, "y":6.5, "w":2.5}, {"x":7.5, "y":6.5, "w":1.25}, {"x":8.75, "y":6.5, "w":1.25}, {"x":10, "y":6.5, "w":1.25}, {"x":11.25, "y":6.5, "w":1.25}, {"x":12.5, "y":6.5, "w":1.25}, {"x":13.75, "y":6.5, "w":1.25}, {"x":15.25, "y":6.5}, {"x":16.25, "y":6.5}, {"x":17.25, "y":6.5}, {"x":18.5, "y":6.5, "w":2}, {"x":20.5, "y":6.5}, {"x":21.5, "y":6.5}]
"layout": [
{"x":2, "y":0, "label":"F13"},
{"x":3, "y":0, "label":"F14"},
{"x":4, "y":0, "label":"F15"},
{"x":5, "y":0, "label":"F16"},
{"x":6, "y":0, "label":"F17"},
{"x":7, "y":0, "label":"F18"},
{"x":8, "y":0, "label":"F19"},
{"x":9, "y":0, "label":"F20"},
{"x":10, "y":0, "label":"F21"},
{"x":11, "y":0, "label":"F22"},
{"x":12, "y":0, "label":"F23"},
{"x":13, "y":0, "label":"F24"},
{"x":0, "y":1, "label":"Escape"},
{"x":2, "y":1, "label":"F1"},
{"x":3, "y":1, "label":"F2"},
{"x":4, "y":1, "label":"F3"},
{"x":5, "y":1, "label":"F4"},
{"x":6, "y":1, "label":"F5"},
{"x":7, "y":1, "label":"F6"},
{"x":8, "y":1, "label":"F7"},
{"x":9, "y":1, "label":"F8"},
{"x":10, "y":1, "label":"F9"},
{"x":11, "y":1, "label":"F10"},
{"x":12, "y":1, "label":"F11"},
{"x":13, "y":1, "label":"F12"},
{"x":15.25, "y":1, "label":"Print Screen"},
{"x":16.25, "y":1, "label":"Scroll Lock"},
{"x":17.25, "y":1, "label":"Pause/Break"},
{"x":19.5, "y":1, "label":"Media Volume Down"},
{"x":20.5, "y":1, "label":"Media Volume Up"},
{"x":21.5, "y":1, "label":"Media Mute"},
{"x":0, "y":2.5, "label":"Grave Accent"},
{"x":1, "y":2.5, "label":"1"},
{"x":2, "y":2.5, "label":"2"},
{"x":3, "y":2.5, "label":"3"},
{"x":4, "y":2.5, "label":"4"},
{"x":5, "y":2.5, "label":"5"},
{"x":6, "y":2.5, "label":"6"},
{"x":7, "y":2.5, "label":"7"},
{"x":8, "y":2.5, "label":"8"},
{"x":9, "y":2.5, "label":"9"},
{"x":10, "y":2.5, "label":"0"},
{"x":11, "y":2.5, "label":"-"},
{"x":12, "y":2.5, "label":"="},
{"x":13, "y":2.5, "label":"International 3 (¥)"},
{"x":14, "y":2.5, "label":"Backspace"},
{"x":15.25, "y":2.5, "label":"Insert"},
{"x":16.25, "y":2.5, "label":"Home"},
{"x":17.25, "y":2.5, "label":"Page Up"},
{"x":18.5, "y":2.5, "label":"Num Lock"},
{"x":19.5, "y":2.5, "label":"Keypad /"},
{"x":20.5, "y":2.5, "label":"Keypad *"},
{"x":21.5, "y":2.5, "label":"Keypad -"},
{"x":0, "y":3.5, "w":1.5, "label":"Tabulator"},
{"x":1.5, "y":3.5, "label":"Q"},
{"x":2.5, "y":3.5, "label":"W"},
{"x":3.5, "y":3.5, "label":"E"},
{"x":4.5, "y":3.5, "label":"R"},
{"x":5.5, "y":3.5, "label":"T"},
{"x":6.5, "y":3.5, "label":"Y"},
{"x":7.5, "y":3.5, "label":"U"},
{"x":8.5, "y":3.5, "label":"I"},
{"x":9.5, "y":3.5, "label":"O"},
{"x":10.5, "y":3.5, "label":"P"},
{"x":11.5, "y":3.5, "label":"["},
{"x":12.5, "y":3.5, "label":"]"},
{"x":13.5, "y":3.5, "w":1.5, "label":"ANSI \\"},
{"x":15.25, "y":3.5, "label":"Delete"},
{"x":16.25, "y":3.5, "label":"End"},
{"x":17.25, "y":3.5, "label":"Page Down"},
{"x":18.5, "y":3.5, "label":"Keypad 7"},
{"x":19.5, "y":3.5, "label":"Keypad 8"},
{"x":20.5, "y":3.5, "label":"Keypad 9"},
{"x":21.5, "y":3.5, "label":"Keypad +"},
{"x":0, "y":4.5, "w":1.75, "label":"Caps Lock"},
{"x":1.75, "y":4.5, "label":"A"},
{"x":2.75, "y":4.5, "label":"S"},
{"x":3.75, "y":4.5, "label":"D"},
{"x":4.75, "y":4.5, "label":"F"},
{"x":5.75, "y":4.5, "label":"G"},
{"x":6.75, "y":4.5, "label":"H"},
{"x":7.75, "y":4.5, "label":"J"},
{"x":8.75, "y":4.5, "label":"K"},
{"x":9.75, "y":4.5, "label":"L"},
{"x":10.75, "y":4.5, "label":";"},
{"x":11.75, "y":4.5, "label":"'"},
{"x":12.75, "y":4.5, "label":"Right ISO"},
{"x":13.75, "y":4.5, "w":1.25, "label":"Return"},
{"x":18.5, "y":4.5, "label":"Keypad 4"},
{"x":19.5, "y":4.5, "label":"Keypad 5"},
{"x":20.5, "y":4.5, "label":"Keypad 6"},
{"x":21.5, "y":4.5, "label":"Keypad ,"},
{"x":0, "y":5.5, "w":1.25, "label":"Left Shift"},
{"x":1.25, "y":5.5, "label":"Left ISO"},
{"x":2.25, "y":5.5, "label":"Z"},
{"x":3.25, "y":5.5, "label":"X"},
{"x":4.25, "y":5.5, "label":"C"},
{"x":5.25, "y":5.5, "label":"V"},
{"x":6.25, "y":5.5, "label":"B"},
{"x":7.25, "y":5.5, "label":"N"},
{"x":8.25, "y":5.5, "label":"M"},
{"x":9.25, "y":5.5, "label":","},
{"x":10.25, "y":5.5, "label":"."},
{"x":11.25, "y":5.5, "label":"/"},
{"x":12.25, "y":5.5, "label":"International 1 (ろ)"},
{"x":13.25, "y":5.5, "w":1.75, "label":"Right Shift"},
{"x":16.25, "y":5.5, "label":"Up"},
{"x":18.5, "y":5.5, "label":"Keypad 1"},
{"x":19.5, "y":5.5, "label":"Keypad 2"},
{"x":20.5, "y":5.5, "label":"Keypad 3"},
{"x":21.5, "y":5.5, "label":"Keypad Enter"},
{"x":0, "y":6.5, "w":1.25, "label":"Left Control"},
{"x":1.25, "y":6.5, "w":1.25, "label":"Left GUI"},
{"x":2.5, "y":6.5, "w":1.25, "label":"Left Alternate"},
{"x":3.75, "y":6.5, "w":1.25, "label":"International 5 (Muhenkan)"},
{"x":5, "y":6.5, "w":2.5, "label":"Space"},
{"x":7.5, "y":6.5, "w":1.25, "label":"International 4 (Henkan)"},
{"x":8.75, "y":6.5, "w":1.25, "label":"International 2 (Kana)"},
{"x":10, "y":6.5, "w":1.25, "label":"Right Alternate"},
{"x":11.25, "y":6.5, "w":1.25, "label":"Right GUI"},
{"x":12.5, "y":6.5, "w":1.25, "label":"Application / Function Layer"},
{"x":13.75, "y":6.5, "w":1.25, "label":"Right Control"},
{"x":15.25, "y":6.5, "label":"Left"},
{"x":16.25, "y":6.5, "label":"Down"},
{"x":17.25, "y":6.5, "label":"Right"},
{"x":18.5, "y":6.5, "w":2, "label":"Keypad 0"},
{"x":20.5, "y":6.5, "label":"Keypad ."},
{"x":21.5, "y":6.5, "label":"Keypad Enter"}
]
}
},
"indicators": {
"caps_lock": "F5",
"num_lock": "F6",
"scroll_lock": "F7"
}
}
Loading