<commit_before>'use strict'

// <? keyHandler.js is getting crowded make mouseHandler.js
document.addEventListener('mousedown', event => {

    if (event.target.classList.contains('window') && event.button == 2) {

        new Draggable({
            event,
            type: 'drag',
            element: Canvas.element,
            object: Canvas,
            // bounderyClamp: Canvas.draggableBoundaryClamp,
        });

    } else if (event.target.tagName == 'path') {

        _(event.target.id);

    } else if (event.target.tagName == 'TD') {

        const nodeObject = nodeFinder.select(event);
        new Draggable({
            event,
            type: 'stick',
            element: nodeObject.nodeElement,
            object: nodeObject
        });

    } else {

        // _(event.target);

    }

});


class State {

    constructor({ defaultState, name, keybinds, mousebinds }) {

        this.keybinds = keybinds || {};
        this.mousebinds = mousebinds || {};

        if (defaultState) {

            State.default = this;

        } else {

            if (name == 'editor') {

                State.current = this;

            }

            State.all[ name ] = this;

        }

    }

    static change(newState) {

        State.current = State.all[ newState ];
        State.current.data = {};

    };

};

State.all = {};

class Key {

    static getName({ keyCode, ctrlKey, shiftKey, altKey }) {

        const modKey = (ctrlKey ? 'ctrl_' : '') + (shiftKey ? 'shift_' : '') /*+ (altKey ? 'alt_' : '')*/;

        return  modKey + Key.names[ keyCode ];<commit_msg>bug: by implementing the key mods the keybind 'other' didn't work<commit_after>'use strict'

// <? keyHandler.js is getting crowded make mouseHandler.js
document.addEventListener('mousedown', event => {

    if (event.target.classList.contains('window') && event.button == 2) {

        new Draggable({
            event,
            type: 'drag',
            element: Canvas.element,
            object: Canvas,
            // bounderyClamp: Canvas.draggableBoundaryClamp,
        });

    } else if (event.target.tagName == 'PATH') {

        _(event.target.id);

    } else if (event.target.tagName == 'TD') {

        const nodeObject = nodeFinder.select(event);
        new Draggable({
            event,
            type: 'stick',
            element: nodeObject.nodeElement,
            object: nodeObject
        });

    } else {

        // _(event.target);

    }

});


class State {

    constructor({ defaultState, name, keybinds, mousebinds }) {

        this.keybinds = keybinds || {};
        this.mousebinds = mousebinds || {};

        if (defaultState) {

            State.default = this;

        } else {

            if (name == 'editor') {

                State.current = this;

            }

            State.all[ name ] = this;

        }

    }

    static change(newState) {

        State.current = State.all[ newState ];
        State.current.data = {};

    };

};

State.all = {};

class Key {

    static getName({ keyCode, ctrlKey, shiftKey, altKey }) {

        const modKey = (ctrlKey ? 'ctrl_' : '') + (shiftKey ? 'shift_' : '') /*+ (altKey ? 'alt_' : '')*/;

        return  Key.names[ keyCode ] ? (modKey + Key.names[ keyCode ]) : undefined;
{'fraction_non_alphanumeric': 0.1430314120158585, 'fraction_numerical': 0.000609942055504727, 'mean_word_length': 1.7938671209540034, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5962465', 'n_tokens_mistral': 1011, 'n_tokens_neox': 957, 'n_words': 211}