Move cxt_studio keyboard to own folder (#24748)
This commit is contained in:
		
							parent
							
								
									fc4d9c63fb
								
							
						
					
					
						commit
						93de533580
					
				
					 7 changed files with 22 additions and 43 deletions
				
			
		
							
								
								
									
										47
									
								
								keyboards/cxt_studio/12e4/cxt_studio.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								keyboards/cxt_studio/12e4/cxt_studio.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,47 @@
 | 
			
		|||
// Copyright 2023 Colin Kinloch (@ColinKinloch)
 | 
			
		||||
// SPDX-License-Identifier: GPL-2.0-or-later
 | 
			
		||||
 | 
			
		||||
#include "quantum.h"
 | 
			
		||||
 | 
			
		||||
#ifdef ENCODER_ENABLE
 | 
			
		||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
 | 
			
		||||
    if (!encoder_update_user(index, clockwise)) {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    switch (index) {
 | 
			
		||||
      case 0: {
 | 
			
		||||
        if (clockwise) {
 | 
			
		||||
            tap_code_delay(KC_VOLU, 10);
 | 
			
		||||
        } else {
 | 
			
		||||
            tap_code_delay(KC_VOLD, 10);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
      case 1: {
 | 
			
		||||
        if (clockwise) {
 | 
			
		||||
            rgb_matrix_increase_hue();
 | 
			
		||||
        } else {
 | 
			
		||||
            rgb_matrix_decrease_hue();
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
      case 2: {
 | 
			
		||||
        if (clockwise) {
 | 
			
		||||
            rgb_matrix_increase_val();
 | 
			
		||||
        } else {
 | 
			
		||||
            rgb_matrix_decrease_val();
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
      case 3: {
 | 
			
		||||
        if (clockwise) {
 | 
			
		||||
            rgb_matrix_step();
 | 
			
		||||
        } else {
 | 
			
		||||
            rgb_matrix_step_reverse();
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
    }
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue