1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #include "4coder_default_include.cpp" extern "C" int32_t get_bindings(void *data, int32_t size){ Bind_Helper context_ = begin_bind_helper(data, size); Bind_Helper *context = &context_; set_all_default_hooks(context); #if defined(__APPLE__) && defined(__MACH__) custom_keys_mac(context); #else default_keys(context); #endif begin_map(context, mapid_global); bind(context, 'p', MDFR_CTRL, open_panel_vsplit); bind(context, 't', MDFR_CTRL, kill_buffer); end_map(context); int32_t result = end_bind_helper(context); return(result); } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #include "4coder_default_include.cpp" extern "C" int32_t get_bindings(void *data, int32_t size){ Bind_Helper context_ = begin_bind_helper(data, size); Bind_Helper *context = &context_; set_all_default_hooks(context); #if defined(__APPLE__) && defined(__MACH__) custom_keys_mac(context); #else default_keys(context); #endif begin_map(context, mapid_global); bind(context, 'p', MDFR_CTRL, open_panel_vsplit); end_map(context); begin_map(context, mapid_file); bind(context, 't', MDFR_CTRL, kill_buffer); end_map(context); int32_t result = end_bind_helper(context); return(result); } |
1 | bind(context, key_left, MDFR_NONE, a_command_here); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | extern "C" int32_t
get_bindings(void *data, int32_t size){
Bind_Helper context_ = begin_bind_helper(data, size);
Bind_Helper *context = &context_;
set_all_default_hooks(context);
#if defined(__APPLE__) && defined(__MACH__)
custom_keys_mac(context);
#else
default_keys(context);
#endif
begin_map(context, mapid_global);
bind(context, 'p', MDFR_CTRL, open_panel_vsplit);
end_map(context);
begin_map(context, mapid_file);
bind(context, 't', MDFR_CTRL, kill_buffer);
end_map(context);
int32_t result = end_bind_helper(context);
return(result);
}
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | extern "C" int32_t
get_bindings(void *data, int32_t size){
Bind_Helper context_ = begin_bind_helper(data, size);
Bind_Helper *context = &context_;
set_all_default_hooks(context);
#if defined(__APPLE__) && defined(__MACH__)
my_custom_key_bindings_mac(context);
#else
my_custom_key_bindings(context);
#endif
int32_t result = end_bind_helper(context);
return(result);
}
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | void my_custom_key_bindings(Bind_Helper* context)
{
begin_map(context, mapid_global);
{
}
end_map(context);
begin_map(context, mapid_file);
{
}
end_map(context);
begin_map(context, default_code_map);
{
}
end_map(context);
begin_map(context, default_lister_ui_map);
{
}
end_map(context);
}
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | void my_custom_key_bindings(Bind_Helper* context)
{
begin_map(context, mapid_global);
{
bind(context, ',', MDFR_CTRL, change_active_panel);
bind(context, 'n', MDFR_CTRL, interactive_new);
bind(context, 'o', MDFR_CTRL, interactive_open_or_new);
bind(context, 'O', MDFR_CTRL, jason_open_in_other);
bind(context, 'i', MDFR_NONE, jason_enter_insert_mode);
bind(context, '`', MDFR_NONE, jason_enter_command_mode);
bind(context, '/', MDFR_NONE, jason_search_from_top_of_buffer);
bind(context, 'z', MDFR_CTRL, undo);
bind(context, 'y', MDFR_CTRL, redo);
bind(context, 's', MDFR_CTRL, jason_save);
bind(context, 'p', MDFR_CTRL, command_lister);
bind(context, ',', MDFR_ALT, change_active_panel);
bind(context, key_f4, MDFR_NONE, jason_project_fkey_command);
bind(context, key_f5, MDFR_NONE, jason_project_fkey_command);
bind(context, key_f6, MDFR_NONE, jason_project_fkey_command);
bind(context, key_f7, MDFR_NONE, jason_project_fkey_command);
bind(context, key_f4, MDFR_ALT, exit_4coder);
bind(context, key_mouse_wheel, MDFR_NONE, mouse_wheel_scroll);
bind(context, key_mouse_wheel, MDFR_CTRL, mouse_wheel_change_face_size);
}
end_map(context);
begin_map(context, mapid_file);
{
bind(context, key_mouse_left, MDFR_NONE, click_set_cursor_and_mark);
bind(context, key_click_activate_view, MDFR_NONE, click_set_cursor_and_mark);
bind(context, key_mouse_left_release, MDFR_NONE, click_set_cursor);
bind(context, key_mouse_move, MDFR_NONE, click_set_cursor_if_lbutton);
bind(context, 'G', MDFR_NONE, goto_end_of_file);
bind(context, 'g', MDFR_NONE, jason_interpret_command);
}
end_map(context);
begin_map(context, default_code_map);
{
inherit_map(context, mapid_file);
bind(context, key_right, MDFR_CTRL, seek_alphanumeric_or_camel_right);
bind(context, 'm', MDFR_CTRL, jason_display_definition);
bind(context, 'M', MDFR_CTRL, test);
bind(context, 's', MDFR_NONE, place_in_scope);
bind(context, '[', MDFR_CTRL, goto_next_error);
bind(context, ']', MDFR_CTRL, goto_prev_error);
}
end_map(context);
begin_map(context, default_lister_ui_map);
{
bind_vanilla_keys(context, lister__write_character);
bind(context, key_esc, MDFR_NONE, lister__quit);
bind(context, '\n', MDFR_NONE, lister__activate);
bind(context, '\t', MDFR_NONE, lister__activate);
bind(context, key_back, MDFR_NONE, lister__backspace_text_field);
bind(context, key_up, MDFR_NONE, lister__move_up);
bind(context, 'k', MDFR_ALT, lister__move_up);
bind(context, key_page_up, MDFR_NONE, lister__move_up);
bind(context, key_down, MDFR_NONE, lister__move_down);
bind(context, 'j', MDFR_ALT, lister__move_down);
bind(context, key_page_down, MDFR_NONE, lister__move_down);
bind(context, key_mouse_wheel, MDFR_NONE, lister__wheel_scroll);
bind(context, key_mouse_left, MDFR_NONE, lister__mouse_press);
bind(context, key_mouse_left_release, MDFR_NONE, lister__mouse_release);
bind(context, key_mouse_move, MDFR_NONE, lister__repaint);
bind(context, key_animate, MDFR_NONE, lister__repaint);
}
end_map(context);
}
|
1 | ./buildsuper.sh custom_layer.cpp |