Customization layer do not working properly

 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
#include "4coder_default_include.cpp"

void custom_keys(Bind_Helper *context){
    
    begin_map(context, mapid_global); {
        bind(context, 'p', MDFR_CTRL, open_panel_vsplit );
        ...
    } end_map(context);
    
    begin_map(context, mapid_file); {
        bind_vanilla_keys(context, write_character);
        ...
    } 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);
        ...
    } 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, key_page_up, MDFR_NONE, lister__move_up);
        bind(context, key_down, MDFR_NONE, 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);
}

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
    custom_keys(context);
#endif
    
    int32_t result = end_bind_helper(context);
    return(result);
}


I just copy that from Customization layer - getting started thread, into my_bindings.cpp file.

Build it with:

1
buildsuper.bat my_bindings.cpp


and all of my keybindings doesn't work excep "open_panel_vsplit" that stated in global_map. How can I inherit all the default keybindings stated in remapping.cpp file?

Do I need to manually place all other bindings in key_maps?
When I tried so, some other problems occured, functionality like Ctrl+o (open file) work well, but selecting via Ctrl+Space doesnt' work at all.

Edited by steughar on
I'm not sure what you're struggling with when <ctrl space> isn't working (what OS is this?).

But you can get all the default keys and then override specifics by doing:

1
2
3
4
5
6
7
#if defined(__APPLE__) && defined(__MACH__)
    mac_default_keys(context);
    custom_keys_mac(context);
#else
    default_keys(context);
    custom_keys(context);
#endif
It's

Windows 10 Pro
Version 1803
Assembly 17134.1

I can't copy something with this sequence
ctrl+space few letters left ctrl+c, there is nothing happens. No highlighting, no animation.

When I select text with mouse, it's all works.
If you're in notepad mode, you can't use the marker. Make sure you're in 4coder mode and try again (either edit the config.4coder file, or use the `set_mode_to_****` commands from the alt+x menu)
Thanks! I just switch from previous version and there weren't thing like that, I gotta read patch note thoroughly next time!