diff --git a/include/m908/getters.cpp b/include/m908/getters.cpp index 7da5d4f..7359273 100644 --- a/include/m908/getters.cpp +++ b/include/m908/getters.cpp @@ -70,7 +70,8 @@ bool mouse_m908::get_detach_kernel_driver(){ int mouse_m908::get_key_mapping_raw( mouse_m908::rd_profile profile, int key, std::array& mapping ){ - if( key < 0 || key > 19 ) // valid key ? + // valid key ? + if( _c_button_names[key] == "" ) return 1; mapping[0] = _s_keymap_data[profile][key][0]; @@ -83,7 +84,8 @@ int mouse_m908::get_key_mapping_raw( mouse_m908::rd_profile profile, int key, st int mouse_m908::get_key_mapping( mouse_m908::rd_profile profile, int key, std::string& mapping ){ - if( key < 0 || key > 19 ) // valid key ? + // valid key ? + if( _c_button_names[key] == "" ) return 1; uint8_t b1 = _s_keymap_data[profile][key][0]; diff --git a/include/rd_mouse.h b/include/rd_mouse.h index d126081..ad1cbf4 100644 --- a/include/rd_mouse.h +++ b/include/rd_mouse.h @@ -93,7 +93,7 @@ class rd_mouse{ }; -// include header files for the individual models TODO! +// include header files for the individual models #include "m908/mouse_m908.h" #include "m709/mouse_m709.h"