@@ -181,6 +181,7 @@ pub struct Cli {
181
181
pub fp_led_level : Option < Option < FpBrightnessArg > > ,
182
182
pub fp_brightness : Option < Option < u8 > > ,
183
183
pub kblight : Option < Option < u8 > > ,
184
+ pub remap_key : Option < ( u8 , u8 , u16 ) > ,
184
185
pub rgbkbd : Vec < u64 > ,
185
186
pub tablet_mode : Option < TabletModeArg > ,
186
187
pub touchscreen_enable : Option < bool > ,
@@ -804,6 +805,15 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
804
805
} else if let Some ( Some ( kblight) ) = args. kblight {
805
806
assert ! ( kblight <= 100 ) ;
806
807
ec. set_keyboard_backlight ( kblight) ;
808
+ } else if let Some ( None ) = args. kblight {
809
+ print ! ( "Keyboard backlight: " ) ;
810
+ if let Some ( percentage) = print_err ( ec. get_keyboard_backlight ( ) ) {
811
+ println ! ( "{}%" , percentage) ;
812
+ } else {
813
+ println ! ( "Unable to tell" ) ;
814
+ }
815
+ } else if let Some ( ( row, col, scanset) ) = args. remap_key {
816
+ print_err ( ec. remap_key ( row, col, scanset) ) ;
807
817
} else if !args. rgbkbd . is_empty ( ) {
808
818
if args. rgbkbd . len ( ) < 2 {
809
819
println ! (
@@ -819,13 +829,6 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
819
829
} ) ;
820
830
ec. rgbkbd_set_color ( start_key, colors. collect ( ) ) . unwrap ( ) ;
821
831
}
822
- } else if let Some ( None ) = args. kblight {
823
- print ! ( "Keyboard backlight: " ) ;
824
- if let Some ( percentage) = print_err ( ec. get_keyboard_backlight ( ) ) {
825
- println ! ( "{}%" , percentage) ;
826
- } else {
827
- println ! ( "Unable to tell" ) ;
828
- }
829
832
} else if let Some ( tablet_arg) = & args. tablet_mode {
830
833
let mode = match tablet_arg {
831
834
TabletModeArg :: Auto => TabletModeOverride :: Default ,
0 commit comments