<commit_before>(function() {
  var vkboard_callback = function(char, id) {}
  var vkboard_norm

  var makeKeyboard = function(id) {
    return new VKeyboard(id,   // container's id, mandatory
                  vkboard_callback,// reference to callback function, mandatory
                                // (this & following parameters are optional)
                  true,         // create the arrow keys or not?
                  true,         // create up and down arrow keys?
                  false,        // reserved
                  true,         // create the numpad or not?
                  "",           // font name ("" == system default)
                  "24px",       // font size in px
                  "#0cc",       // font color
                  "#F00",       // font color for the dead keys
                  "#0D0D0D",       // keyboard base background color
                  "#222",       // keys' background color
                  "#CCC",       // background color of switched/selected item
                  "#777",       // border color
                  "#444",       // border/font color of "inactive" key
                                // (key with no value/disabled)
                  "#111",       // background color of "inactive" key
                                // (key with no value/disabled)
                  "#F77",       // border color of language selector's cell
                  false,         // show key flash on click? (false by default)
                  "#CC3300",    // font color during flash
                  "#FF9966",    // key background color during flash
                  "#CC3300",    // key border color during flash
                  true,        // embed VKeyboard into the page?
                  true,         // use 1-pixel gap between the keys?
                  0);           // index (0-based) of the initial layout
  }

  model.settingGroups().push("keyview");
  model.settingDefinitions().keyview = {title:"KeyView",settings:{}};
  $.get('coui://ui/mods/keyboard_viewer/keyboard_viewer.html', function(html) {
    var $section = $(html)
    $(".container_settings").append($section)
    ko.applyBindings(model, $section[0])

    var boards = {
      'normal': {},
      'build:normal': {},
      'ctrl': {},
      'alt': {},
      'shift': {},
    }

    var keymap = {
      'left': '<',
      'right': '>',
      'up': '/\\',
      'down': '\\/',
    }
    ko.computed(function() {
      model.keyboardSettingsItems().forEach(function(item) {
        var combo = item.value()
        if (combo == '') return
        var parts = combo.split('+')
        var key = parts.pop()
        var board = parts.sort().join('+')

        key = keymap[key] || key

        if (board == '') board = 'normal'
        if (item.options.set == 'terrain editor') board = 'terrain:' + board
        if (item.options.display_sub_group == '!LOC(settings:free_movement.message):free movement') board = 'freecam:' + board
        if (item.options.display_sub_group == '!LOC(settings:build_bar_groups.message):build bar groups') board = 'build:' + board
        if (item.options.display_sub_group == '!LOC(settings:build_items.message):build items') board = 'build:' + board

        boards[board] = boards[board] || {}
        boards[board][key] = item
      })
    })

    var $keyboards = $('.kbv_keyboards')
    for(var prefix in boards) {
      var id = 'vkeyboard_' + prefix.replace('+', '_').replace(':', '_')
      var $kb = $('<div class="sub-group-title">' + prefix + '</div><div id="' + id + '"></div>')
      $keyboards.append($kb)
      var vkb = makeKeyboard(id)
      $(vkb.Cntr).find('div div div div').each(function() {<commit_msg>put build groups in primary board<commit_after>(function() {
  var vkboard_callback = function(char, id) {}
  var vkboard_norm

  var makeKeyboard = function(id) {
    return new VKeyboard(id,   // container's id, mandatory
                  vkboard_callback,// reference to callback function, mandatory
                                // (this & following parameters are optional)
                  true,         // create the arrow keys or not?
                  true,         // create up and down arrow keys?
                  false,        // reserved
                  true,         // create the numpad or not?
                  "",           // font name ("" == system default)
                  "24px",       // font size in px
                  "#0cc",       // font color
                  "#F00",       // font color for the dead keys
                  "#0D0D0D",       // keyboard base background color
                  "#222",       // keys' background color
                  "#CCC",       // background color of switched/selected item
                  "#777",       // border color
                  "#444",       // border/font color of "inactive" key
                                // (key with no value/disabled)
                  "#111",       // background color of "inactive" key
                                // (key with no value/disabled)
                  "#F77",       // border color of language selector's cell
                  false,         // show key flash on click? (false by default)
                  "#CC3300",    // font color during flash
                  "#FF9966",    // key background color during flash
                  "#CC3300",    // key border color during flash
                  true,        // embed VKeyboard into the page?
                  true,         // use 1-pixel gap between the keys?
                  0);           // index (0-based) of the initial layout
  }

  model.settingGroups().push("keyview");
  model.settingDefinitions().keyview = {title:"KeyView",settings:{}};
  $.get('coui://ui/mods/keyboard_viewer/keyboard_viewer.html', function(html) {
    var $section = $(html)
    $(".container_settings").append($section)
    ko.applyBindings(model, $section[0])

    var boards = {
      'normal': {},
      'build:normal': {},
      'ctrl': {},
      'alt': {},
      'shift': {},
    }

    var keymap = {
      'left': '<',
      'right': '>',
      'up': '/\\',
      'down': '\\/',
    }
    ko.computed(function() {
      model.keyboardSettingsItems().forEach(function(item) {
        var combo = item.value()
        if (combo == '') return
        var parts = combo.split('+')
        var key = parts.pop()
        var board = parts.sort().join('+')

        key = keymap[key] || key

        if (board == '') board = 'normal'
        if (item.options.set == 'terrain editor') board = 'terrain:' + board
        if (item.options.display_sub_group == '!LOC(settings:free_movement.message):free movement') board = 'freecam:' + board
        if (item.options.display_sub_group == '!LOC(settings:build_items.message):build items') board = 'build:' + board

        boards[board] = boards[board] || {}
        boards[board][key] = item
      })
    })

    var $keyboards = $('.kbv_keyboards')
    for(var prefix in boards) {
      var id = 'vkeyboard_' + prefix.replace('+', '_').replace(':', '_')
      var $kb = $('<div class="sub-group-title">' + prefix + '</div><div id="' + id + '"></div>')
      $keyboards.append($kb)
      var vkb = makeKeyboard(id)
      $(vkb.Cntr).find('div div div div').each(function() {
{'fraction_non_alphanumeric': 0.14563638854637623, 'fraction_numerical': 0.010412385258254555, 'mean_word_length': 1.6221264367816093, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2355843', 'n_tokens_mistral': 2067, 'n_tokens_neox': 1976, 'n_words': 535}