Add UC-1 keypad (#11926)
Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: online <33636898+online@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									d395c81606
								
							
						
					
					
						commit
						7b07ce3fef
					
				
					 10 changed files with 245 additions and 0 deletions
				
			
		
							
								
								
									
										40
									
								
								keyboards/merge/uc1/keymaps/default/keymap.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								keyboards/merge/uc1/keymaps/default/keymap.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,40 @@ | |||
| /* Copyright 2021 duoshock 
 | ||||
|   *  | ||||
|   * This program is free software: you can redistribute it and/or modify  | ||||
|   * it under the terms of the GNU General Public License as published by  | ||||
|   * the Free Software Foundation, either version 2 of the License, or  | ||||
|   * (at your option) any later version.  | ||||
|   *  | ||||
|   * This program is distributed in the hope that it will be useful,  | ||||
|   * but WITHOUT ANY WARRANTY; without even the implied warranty of  | ||||
|   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  | ||||
|   * GNU General Public License for more details.  | ||||
|   *  | ||||
|   * You should have received a copy of the GNU General Public License  | ||||
|   * along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 | ||||
|   */  | ||||
| 
 | ||||
| #include QMK_KEYBOARD_H | ||||
| 
 | ||||
| const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||||
| 
 | ||||
| /* LAYER 0
 | ||||
|  * ,---------------------------------. | ||||
|  * | Encoder |   1   |   2   |   3   | | ||||
|  * `---------------------------------' | ||||
|  */ | ||||
| [0] = LAYOUT( | ||||
|   KC_MUTE, KC_1, KC_2, KC_3 | ||||
| ), | ||||
| }; | ||||
| 
 | ||||
| 
 | ||||
| void encoder_update_user(uint8_t index, bool clockwise) { | ||||
|     if (index == 0) { | ||||
|         if (clockwise) { | ||||
|             tap_code(KC_VOLU); | ||||
|         } else { | ||||
|             tap_code(KC_VOLD); | ||||
|         } | ||||
|     } | ||||
| } | ||||
							
								
								
									
										5
									
								
								keyboards/merge/uc1/keymaps/default/readme.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/merge/uc1/keymaps/default/readme.md
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| # Default UC-1 Layout | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| This is the default layout that comes flashed on every UC-1. | ||||
							
								
								
									
										53
									
								
								keyboards/merge/uc1/keymaps/via/keymap.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								keyboards/merge/uc1/keymaps/via/keymap.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,53 @@ | |||
|  /* Copyright 2021 duoshock 
 | ||||
|   *  | ||||
|   * This program is free software: you can redistribute it and/or modify  | ||||
|   * it under the terms of the GNU General Public License as published by  | ||||
|   * the Free Software Foundation, either version 2 of the License, or  | ||||
|   * (at your option) any later version.  | ||||
|   *  | ||||
|   * This program is distributed in the hope that it will be useful,  | ||||
|   * but WITHOUT ANY WARRANTY; without even the implied warranty of  | ||||
|   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  | ||||
|   * GNU General Public License for more details.  | ||||
|   *  | ||||
|   * You should have received a copy of the GNU General Public License  | ||||
|   * along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 | ||||
|   */  | ||||
| 
 | ||||
| #include QMK_KEYBOARD_H | ||||
| 
 | ||||
| const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||||
| 
 | ||||
| /* LAYER 0
 | ||||
|  * ,---------------------------------. | ||||
|  * | Encoder |   1   |   2   |   3   | | ||||
|  * `---------------------------------' | ||||
|  */ | ||||
| [0] = LAYOUT( | ||||
|   KC_MUTE, KC_1, KC_2, KC_3 | ||||
| ), | ||||
| 
 | ||||
| [1] = LAYOUT( | ||||
|   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||||
| ), | ||||
| 
 | ||||
| [2] = LAYOUT( | ||||
|   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||||
| ), | ||||
| 
 | ||||
| [3] = LAYOUT( | ||||
|   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||||
| ) | ||||
| 
 | ||||
| }; | ||||
| 
 | ||||
| 
 | ||||
| void encoder_update_user(uint8_t index, bool clockwise) { | ||||
|     if (index == 0) { | ||||
|         if (clockwise) { | ||||
|             tap_code(KC_VOLU); | ||||
|         } else { | ||||
|             tap_code(KC_VOLD); | ||||
|         } | ||||
|     } | ||||
| } | ||||
							
								
								
									
										2
									
								
								keyboards/merge/uc1/keymaps/via/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								keyboards/merge/uc1/keymaps/via/rules.mk
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,2 @@ | |||
| VIA_ENABLE = yes | ||||
| LTO_ENABLE = yes | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 duoshock
						duoshock