diff --git a/4coder_API/types.h b/4coder_API/types.h index ae606e45..aa0e3404 100644 --- a/4coder_API/types.h +++ b/4coder_API/types.h @@ -36,7 +36,11 @@ ENUM(int32_t, Key_Modifier_Index){ MDFR_CONTROL_INDEX, MDFR_ALT_INDEX, MDFR_COMMAND_INDEX, - MDFR_CAPS_INDEX, + + /* DOC(MDFR_INDEX_BINDABLE_COUNT is used to specify the number of supported modifiers that can be used in key bindings.) */ + MDFR_INDEX_BINDABLE_COUNT, + + MDFR_CAPS_INDEX = MDFR_INDEX_BINDABLE_COUNT, MDFR_HOLD_INDEX, /* DOC(MDFR_INDEX_COUNT is used to specify the number of modifiers supported.) */ diff --git a/4ed_command.cpp b/4ed_command.cpp index 21fb99b5..8963b860 100644 --- a/4ed_command.cpp +++ b/4ed_command.cpp @@ -26,7 +26,7 @@ static Command_Binding null_command_binding = {0}; struct Command_Map{ i32 parent; - Command_Binding vanilla_keyboard_default[8]; + Command_Binding vanilla_keyboard_default[1 << MDFR_INDEX_BINDABLE_COUNT]; Command_Binding *commands; i32 count, max; void *real_beginning;