Add alps64 keymap editor
This commit is contained in:
parent
c3b978a9eb
commit
8efe957224
1385
editor/alps64/firmware.js
Normal file
1385
editor/alps64/firmware.js
Normal file
File diff suppressed because it is too large
Load Diff
718
editor/alps64/index.html
Normal file
718
editor/alps64/index.html
Normal file
@ -0,0 +1,718 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>TMK Keymap Editor</title>
|
||||||
|
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
|
||||||
|
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
|
||||||
|
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
|
||||||
|
<script src="keymap_editor.js"></script>
|
||||||
|
<script src="firmware.js"></script>
|
||||||
|
<link href='keyboard.css' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// key id under editing
|
||||||
|
var editing_key;
|
||||||
|
// layer under editing
|
||||||
|
var editing_layer = 0;
|
||||||
|
|
||||||
|
// load keymap on keyboard key buttons
|
||||||
|
var load_keymap_on_keyobard = function(layer, keymap) {
|
||||||
|
for (var row in keymap) {
|
||||||
|
for (var col in keymap[row]) {
|
||||||
|
var code = keymap[row][col];
|
||||||
|
var key = code_display[code];
|
||||||
|
$("#key-0" + row + "0" + col).text(key.name);
|
||||||
|
$("#key-0" + row + "0" + col).attr({ title: key.desc });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
// Title
|
||||||
|
document.title = "TMK Keymap Editor for " + KEYBOARD_DESC;
|
||||||
|
$("#page-title").text("TMK Keymap Editor for " + KEYBOARD_DESC);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* load keymap from URL hash
|
||||||
|
*/
|
||||||
|
var decoded = decode_keymap(document.location.hash.substring(1));
|
||||||
|
if (decoded != null) {
|
||||||
|
keymaps = decoded['keymaps'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Layer selector
|
||||||
|
*/
|
||||||
|
$("#layer_radio").buttonset();
|
||||||
|
|
||||||
|
// layer change
|
||||||
|
$(".layer").click(function(ev, ui) {
|
||||||
|
var layer = parseInt($(this).attr('id').match(/layer-(\d+)/)[1]);
|
||||||
|
editing_layer = layer;
|
||||||
|
load_keymap_on_keyobard(layer, keymaps[layer]);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard(key buttons)
|
||||||
|
*/
|
||||||
|
// load default keymap on startup
|
||||||
|
load_keymap_on_keyobard(0, keymaps[0]);
|
||||||
|
|
||||||
|
// Select key button to edit
|
||||||
|
$(".key").click(function(ev, ui) {
|
||||||
|
editing_key = $(this).attr('id');
|
||||||
|
|
||||||
|
// grey-out key to indicate being under editing
|
||||||
|
$(".key").removeClass("key-editing");
|
||||||
|
$(this).addClass("key-editing");
|
||||||
|
}).focus(function(ev, ui) {
|
||||||
|
// select editing_key with tab key focus
|
||||||
|
$(this).click();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keycodes button tab
|
||||||
|
*/
|
||||||
|
$("#keycode_tabs").tabs({
|
||||||
|
heightStyle: "auto",
|
||||||
|
});
|
||||||
|
|
||||||
|
// Keycodes: read name and description from code table
|
||||||
|
$(".action").each(function(index) {
|
||||||
|
// get code from code button id: code-[0x]CCCC where CCCC is dec or hex number
|
||||||
|
var code = parseInt($(this).attr('id').match(/code-((0x){0,1}[0-9a-fA-F]+)/)[1]);
|
||||||
|
$(this).text(code_display[code].name);
|
||||||
|
$(this).attr({ title: code_display[code].desc });
|
||||||
|
//console.log(index + ": " + code + " " + code_display[code].desc);
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".action").click(function(ev,ui) {
|
||||||
|
console.log("action click");
|
||||||
|
if (!editing_key) return;
|
||||||
|
|
||||||
|
// get matrix position from key id: key-RRCC where RR is row and CC is column in dec
|
||||||
|
var pos = editing_key.match(/key-(\d\d)(\d\d)/i);
|
||||||
|
if (!pos) return;
|
||||||
|
var row = parseInt(pos[1]), col = parseInt(pos[2]);
|
||||||
|
|
||||||
|
// set text and tooltip to key button under editing
|
||||||
|
$("#" + editing_key).text($(this).text());
|
||||||
|
$("#" + editing_key).attr({ title: $(this).attr('title'), });
|
||||||
|
|
||||||
|
// change keymap array
|
||||||
|
// get code from keycode button id: code-[0x]CC where CC is dec or hex number
|
||||||
|
var code = $(this).attr('id').match(/code-((0x){0,1}[0-9a-fA-F]+)/)[1];
|
||||||
|
keymaps[editing_layer][row][col] = parseInt(code);
|
||||||
|
|
||||||
|
// give focus on editing_key for next tab key operation
|
||||||
|
$("#" + editing_key).focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Share URL
|
||||||
|
*/
|
||||||
|
// Share URL
|
||||||
|
$("#keymap-share").click(function(ev, ui) {
|
||||||
|
var hash = encode_keymap({ keymaps: keymaps });
|
||||||
|
$("#share-url").text(document.location.origin + document.location.pathname + "#" + hash);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Shorten URL
|
||||||
|
$("#shorten-url").click(function(ev, ui) {
|
||||||
|
var hash = encode_keymap({ keymaps: keymaps });
|
||||||
|
var editor_url = document.location.origin + document.location.pathname;
|
||||||
|
window.open("https://bitly.com/shorten/?url=" + encodeURIComponent(editor_url + "#" + hash));
|
||||||
|
//window.open("http://tinyurl.com/create.php?url=" + encodeURIComponent(editor_url + "#" + hash));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Hex Save
|
||||||
|
$("#keymap-download").click(function(ev, ui) {
|
||||||
|
var keymap_data = fn_actions.concat(keymaps);
|
||||||
|
var content = firmware_hex() +
|
||||||
|
hex_output(KEYMAP_START_ADDRESS, keymap_data) +
|
||||||
|
hex_eof();
|
||||||
|
|
||||||
|
// download hex file
|
||||||
|
var blob = new Blob([content], {type: "application/octet-stream"});
|
||||||
|
var hex_link = $("#hex-download");
|
||||||
|
hex_link.attr('href', window.URL.createObjectURL(blob));
|
||||||
|
hex_link.attr('download', KEYBOARD_ID + "_firmware.hex");
|
||||||
|
// jQuery click() doesn't work straight for 'a' element
|
||||||
|
// http://stackoverflow.com/questions/1694595/
|
||||||
|
hex_link[0].click();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Output options
|
||||||
|
*/
|
||||||
|
//$("#keymap-output").resizable(); // resizable textarea
|
||||||
|
|
||||||
|
// Hex output
|
||||||
|
$("#keymap-hex-generate").click(function(ev, ui) {
|
||||||
|
var keymap_data = fn_actions.concat(keymaps);
|
||||||
|
$("#keymap-output").text(hex_output(KEYMAP_START_ADDRESS, keymap_data));
|
||||||
|
});
|
||||||
|
|
||||||
|
// C source output
|
||||||
|
$("#keymap-source-generate").click(function(ev, ui) {
|
||||||
|
$("#keymap-output").text(source_output(keymaps));
|
||||||
|
});
|
||||||
|
|
||||||
|
// JSON output
|
||||||
|
//$("#keymap-json-generate").css('display', 'none'); // hide
|
||||||
|
$("#keymap-json-generate").click(function(ev, ui) {
|
||||||
|
var keymap_output;
|
||||||
|
//keymap_output = JSON.stringify(keymaps, null, 4);
|
||||||
|
keymap_output = JSON.stringify({ keymaps: keymaps });
|
||||||
|
$("#keymap-output").text(keymap_output);
|
||||||
|
});
|
||||||
|
|
||||||
|
// encode keymap
|
||||||
|
$("#keymap-encode").click(function(ev, ui) {
|
||||||
|
var keymap_output = encode_keymap({ keymaps: keymaps });
|
||||||
|
$("#keymap-output").text(keymap_output);
|
||||||
|
});
|
||||||
|
|
||||||
|
// decode keymap
|
||||||
|
$("#keymap-decode").click(function(ev, ui) {
|
||||||
|
var hash = $("#keymap-output").text();
|
||||||
|
var keymap_output = decode_keymap(hash);
|
||||||
|
$("#keymap-output").text(JSON.stringify(keymap_output));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// lost keymap under edting when leave the page
|
||||||
|
/* TODO: Needed when released
|
||||||
|
$(window).bind('beforeunload', function(){
|
||||||
|
return 'CAUTION: You will lost your change.';
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1 id="page-title">TMK Keymap Editor</h1>
|
||||||
|
|
||||||
|
<h3>Instruction</h3>
|
||||||
|
How to edit keymap
|
||||||
|
<ol>
|
||||||
|
<li>Select layer</li>
|
||||||
|
<li>Select key to edit</li>
|
||||||
|
<li>Select keycode to assign to the key</li>
|
||||||
|
<li>Download firmware</li>
|
||||||
|
</ol>
|
||||||
|
See <a href="https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md" target="_blank">this</a> for detailed description of keymap.
|
||||||
|
|
||||||
|
<h2>Keyboard</h2>
|
||||||
|
<div id="keyboard-pane" class="keyboard-pane">
|
||||||
|
<form>
|
||||||
|
<div id="layer_radio">
|
||||||
|
<input type="radio" name="radio" class="layer" id="layer-0"checked="checked" /><label for="layer-0">Layer 0</label>
|
||||||
|
<input type="radio" name="radio" class="layer" id="layer-1"/><label for="layer-1">Layer 1</label>
|
||||||
|
<input type="radio" name="radio" class="layer" id="layer-2"/><label for="layer-2">Layer 2</label>
|
||||||
|
<input type="radio" name="radio" class="layer" id="layer-3"/><label for="layer-3">Layer 3</label>
|
||||||
|
<input type="radio" name="radio" class="layer" id="layer-4"/><label for="layer-4">Layer 4</label>
|
||||||
|
<input type="radio" name="radio" class="layer" id="layer-5"/><label for="layer-5">Layer 5</label>
|
||||||
|
<input type="radio" name="radio" class="layer" id="layer-6"/><label for="layer-6">Layer 6</label>
|
||||||
|
<input type="radio" name="radio" class="layer" id="layer-7"/><label for="layer-7">Layer 7</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Keyboard keys
|
||||||
|
-->
|
||||||
|
<div id="keyboard-outline" class="keyboard-outline">
|
||||||
|
<div class='keyboard-row'>
|
||||||
|
<div id="key-0306" class="key" tabindex="1">Esc</div>
|
||||||
|
<div id="key-0307" class="key" tabindex="1">1</div>
|
||||||
|
<div id="key-0406" class="key" tabindex="1">2</div>
|
||||||
|
<div id="key-0407" class="key" tabindex="1">3</div>
|
||||||
|
<div id="key-0506" class="key" tabindex="1">4</div>
|
||||||
|
<div id="key-0507" class="key" tabindex="1">5</div>
|
||||||
|
<div id="key-0606" class="key" tabindex="1">6</div>
|
||||||
|
<div id="key-0607" class="key" tabindex="1">7</div>
|
||||||
|
<div id="key-0706" class="key" tabindex="1">8</div>
|
||||||
|
<div id="key-0707" class="key" tabindex="1">9</div>
|
||||||
|
<div id="key-0006" class="key" tabindex="1">0</div>
|
||||||
|
<div id="key-0007" class="key" tabindex="1">-</div>
|
||||||
|
<div id="key-0107" class="key" tabindex="1">=</div>
|
||||||
|
<div id="key-0206" class="key" tabindex="1">Iso1</div>
|
||||||
|
<div id="key-0207" class="key" tabindex="1">BSpc</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='keyboard-row'>
|
||||||
|
<div id="key-0304" class="key btn150" tabindex="2">Tab</div>
|
||||||
|
<div id="key-0305" class="key" tabindex="2">Q</div>
|
||||||
|
<div id="key-0404" class="key" tabindex="2">W</div>
|
||||||
|
<div id="key-0405" class="key" tabindex="2">E</div>
|
||||||
|
<div id="key-0504" class="key" tabindex="2">R</div>
|
||||||
|
<div id="key-0505" class="key" tabindex="2">T</div>
|
||||||
|
<div id="key-0604" class="key" tabindex="2">Y</div>
|
||||||
|
<div id="key-0605" class="key" tabindex="2">U</div>
|
||||||
|
<div id="key-0705" class="key" tabindex="2">I</div>
|
||||||
|
<div id="key-0005" class="key" tabindex="2">O</div>
|
||||||
|
<div id="key-0105" class="key" tabindex="2">P</div>
|
||||||
|
<div id="key-0106" class="key" tabindex="2">[</div>
|
||||||
|
<div id="key-0205" class="key" tabindex="2">]</div>
|
||||||
|
<div id="key-0204" class="key btn150" tabindex="2">\</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='keyboard-row'>
|
||||||
|
<div id="key-0302" class="key btn175" tabindex="3">Ctrl</div>
|
||||||
|
<div id="key-0303" class="key" tabindex="3">A</div>
|
||||||
|
<div id="key-0403" class="key" tabindex="3">S</div>
|
||||||
|
<div id="key-0502" class="key" tabindex="3">D</div>
|
||||||
|
<div id="key-0503" class="key" tabindex="3">F</div>
|
||||||
|
<div id="key-0603" class="key" tabindex="3">G</div>
|
||||||
|
<div id="key-0703" class="key" tabindex="3">H</div>
|
||||||
|
<div id="key-0704" class="key" tabindex="3">J</div>
|
||||||
|
<div id="key-0003" class="key" tabindex="3">K</div>
|
||||||
|
<div id="key-0004" class="key" tabindex="3">L</div>
|
||||||
|
<div id="key-0103" class="key" tabindex="3">;</div>
|
||||||
|
<div id="key-0104" class="key" tabindex="3">'</div>
|
||||||
|
<div id="key-0203" class="key btn225" tabindex="3">Enter</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='keyboard-row'>
|
||||||
|
<div id="key-0301" class="key btn125" tabindex="4">Shift</div>
|
||||||
|
<div id="key-0401" class="key" tabindex="4">Z</div>
|
||||||
|
<div id="key-0402" class="key" tabindex="4">Iso2</div>
|
||||||
|
<div id="key-0501" class="key" tabindex="4">X</div>
|
||||||
|
<div id="key-0601" class="key" tabindex="4">C</div>
|
||||||
|
<div id="key-0602" class="key" tabindex="4">V</div>
|
||||||
|
<div id="key-0701" class="key" tabindex="4">B</div>
|
||||||
|
<div id="key-0702" class="key" tabindex="4">N</div>
|
||||||
|
<div id="key-0001" class="key" tabindex="4">M</div>
|
||||||
|
<div id="key-0002" class="key" tabindex="4">,</div>
|
||||||
|
<div id="key-0101" class="key" tabindex="4">.</div>
|
||||||
|
<div id="key-0102" class="key" tabindex="4">/</div>
|
||||||
|
<div id="key-0201" class="key btn175" tabindex="4">Shift</div>
|
||||||
|
<div id="key-0202" class="key" tabindex="4">Fn</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='keyboard-row'>
|
||||||
|
<div id="key-0300" class="key btn125" tabindex="5">LCtl</div>
|
||||||
|
<div id="key-0400" class="key btn125" tabindex="5">LGui</div>
|
||||||
|
<div id="key-0500" class="key btn125" tabindex="5">LAlt</div>
|
||||||
|
<div id="key-0600" class="key btn625" tabindex="5">Space</div>
|
||||||
|
<div id="key-0700" class="key btn125" tabindex="5">App</div>
|
||||||
|
<div id="key-0000" class="key btn125" tabindex="5">RAlt</div>
|
||||||
|
<div id="key-0100" class="key btn125" tabindex="5">RGui</div>
|
||||||
|
<div id="key-0200" class="key btn125" tabindex="5">RCtl</div>
|
||||||
|
</div>
|
||||||
|
<div class="Thank"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Keycodes</h2>
|
||||||
|
<div id="keycode_tabs" class="keycode_tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-main">Main</a></li>
|
||||||
|
<li><a href="#tabs-other">Function and keypad</a></li>
|
||||||
|
<li><a href="#tabs-special">System, Media and Mouse key</a></li>
|
||||||
|
<li><a href="#tabs-layer">Layer Switching and etc.</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!-- Main -->
|
||||||
|
<div id="tabs-main">
|
||||||
|
<button class="action" id="code-0">NO</button>
|
||||||
|
<button class="action" id="code-1">TRNS</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<button class="action" id="code-4" title="A">A</button>
|
||||||
|
<button class="action" id="code-5" title="B">B</button>
|
||||||
|
<button class="action" id="code-6" title="C">C</button>
|
||||||
|
<button class="action" id="code-7" title="D">D</button>
|
||||||
|
<button class="action" id="code-8" title="E">E</button>
|
||||||
|
<button class="action" id="code-9" title="F">F</button>
|
||||||
|
<button class="action" id="code-10" title="G">G</button>
|
||||||
|
<button class="action" id="code-11" title="H">H</button>
|
||||||
|
<button class="action" id="code-12" title="I">I</button>
|
||||||
|
<button class="action" id="code-13" title="J">J</button>
|
||||||
|
<button class="action" id="code-14" title="K">K</button>
|
||||||
|
<button class="action" id="code-15" title="L">L</button>
|
||||||
|
<button class="action" id="code-16" title="M">M</button>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-17" title="N">N</button>
|
||||||
|
<button class="action" id="code-18" title="O">O</button>
|
||||||
|
<button class="action" id="code-19" title="P">P</button>
|
||||||
|
<button class="action" id="code-20" title="Q">Q</button>
|
||||||
|
<button class="action" id="code-21" title="R">R</button>
|
||||||
|
<button class="action" id="code-22" title="S">S</button>
|
||||||
|
<button class="action" id="code-23" title="T">T</button>
|
||||||
|
<button class="action" id="code-24" title="U">U</button>
|
||||||
|
<button class="action" id="code-25" title="V">V</button>
|
||||||
|
<button class="action" id="code-26" title="W">W</button>
|
||||||
|
<button class="action" id="code-27" title="X">X</button>
|
||||||
|
<button class="action" id="code-28" title="Y">Y</button>
|
||||||
|
<button class="action" id="code-29" title="Z">Z</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-30" title="1">1</button>
|
||||||
|
<button class="action" id="code-31" title="2">2</button>
|
||||||
|
<button class="action" id="code-32" title="3">3</button>
|
||||||
|
<button class="action" id="code-33" title="4">4</button>
|
||||||
|
<button class="action" id="code-34" title="5">5</button>
|
||||||
|
<button class="action" id="code-35" title="6">6</button>
|
||||||
|
<button class="action" id="code-36" title="7">7</button>
|
||||||
|
<button class="action" id="code-37" title="8">8</button>
|
||||||
|
<button class="action" id="code-38" title="9">9</button>
|
||||||
|
<button class="action" id="code-39" title="0">0</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-45" title="MINUS">MINUS</button>
|
||||||
|
<button class="action" id="code-46" title="EQUAL">EQUAL</button>
|
||||||
|
<button class="action" id="code-47" title="LBRACKET">LBRACKET</button>
|
||||||
|
<button class="action" id="code-48" title="RBRACKET">RBRACKET</button>
|
||||||
|
<button class="action" id="code-49" title="BSLASH">BSLASH</button>
|
||||||
|
<button class="action" id="code-51" title="SCOLON">SCOLON</button>
|
||||||
|
<button class="action" id="code-52" title="QUOTE">QUOTE</button>
|
||||||
|
<button class="action" id="code-53" title="GRAVE">GRAVE</button>
|
||||||
|
<button class="action" id="code-54" title="COMMA">COMMA</button>
|
||||||
|
<button class="action" id="code-55" title="DOT">DOT</button>
|
||||||
|
<button class="action" id="code-56" title="SLASH">SLASH</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-40" title="ENTER">ENTER</button>
|
||||||
|
<button class="action" id="code-41" title="ESCAPE">ESCAPE</button>
|
||||||
|
<button class="action" id="code-42" title="BackSpace">BSPACE</button>
|
||||||
|
<button class="action" id="code-43" title="TAB">TAB</button>
|
||||||
|
<button class="action" id="code-44" title="SPACE">SPACE</button>
|
||||||
|
<button class="action" id="code-57" title="CAPSLOCK">CAPSLOCK</button>
|
||||||
|
<button class="action" id="code-101" title="APPLICATION">APPLICATION</button>
|
||||||
|
<button class="action" id="code-50" title="NONUS_HASH">NONUS_HASH</button>
|
||||||
|
<button class="action" id="code-100" title="NONUS_BSLASH">NONUS_BSLASH</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-224" title="LCTRL">LCTRL</button>
|
||||||
|
<button class="action" id="code-225" title="LSHIFT">LSHIFT</button>
|
||||||
|
<button class="action" id="code-226" title="LALT">LALT</button>
|
||||||
|
<button class="action" id="code-227" title="LGUI">LGUI</button>
|
||||||
|
<button class="action" id="code-228" title="RCTRL">RCTRL</button>
|
||||||
|
<button class="action" id="code-229" title="RSHIFT">RSHIFT</button>
|
||||||
|
<button class="action" id="code-230" title="RALT">RALT</button>
|
||||||
|
<button class="action" id="code-231" title="RGUI">RGUI</button>
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Function and Navigation -->
|
||||||
|
<div id="tabs-other">
|
||||||
|
<button class="action" id="code-0">NO</button>
|
||||||
|
<button class="action" id="code-1">TRNS</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-58" title="F1">F1</button>
|
||||||
|
<button class="action" id="code-59" title="F2">F2</button>
|
||||||
|
<button class="action" id="code-60" title="F3">F3</button>
|
||||||
|
<button class="action" id="code-61" title="F4">F4</button>
|
||||||
|
<button class="action" id="code-62" title="F5">F5</button>
|
||||||
|
<button class="action" id="code-63" title="F6">F6</button>
|
||||||
|
<button class="action" id="code-64" title="F7">F7</button>
|
||||||
|
<button class="action" id="code-65" title="F8">F8</button>
|
||||||
|
<button class="action" id="code-66" title="F9">F9</button>
|
||||||
|
<button class="action" id="code-67" title="F10">F10</button>
|
||||||
|
<button class="action" id="code-68" title="F11">F11</button>
|
||||||
|
<button class="action" id="code-69" title="F12">F12</button>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-104" title="F13">F13</button>
|
||||||
|
<button class="action" id="code-105" title="F14">F14</button>
|
||||||
|
<button class="action" id="code-106" title="F15">F15</button>
|
||||||
|
<button class="action" id="code-107" title="F16">F16</button>
|
||||||
|
<button class="action" id="code-108" title="F17">F17</button>
|
||||||
|
<button class="action" id="code-109" title="F18">F18</button>
|
||||||
|
<button class="action" id="code-110" title="F19">F19</button>
|
||||||
|
<button class="action" id="code-111" title="F20">F20</button>
|
||||||
|
<button class="action" id="code-112" title="F21">F21</button>
|
||||||
|
<button class="action" id="code-113" title="F22">F22</button>
|
||||||
|
<button class="action" id="code-114" title="F23">F23</button>
|
||||||
|
<button class="action" id="code-115" title="F24">F24</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-70" title="PSCREEN">PSCREEN</button>
|
||||||
|
<button class="action" id="code-71" title="SCROLLLOCK">SCROLLLOCK</button>
|
||||||
|
<button class="action" id="code-72" title="PAUSE">PAUSE</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-73" title="INSERT">INSERT</button>
|
||||||
|
<button class="action" id="code-74" title="HOME">HOME</button>
|
||||||
|
<button class="action" id="code-75" title="PGUP">PGUP</button>
|
||||||
|
<button class="action" id="code-76" title="DELETE">DELETE</button>
|
||||||
|
<button class="action" id="code-77" title="END">END</button>
|
||||||
|
<button class="action" id="code-78" title="PGDOWN">PGDOWN</button>
|
||||||
|
<button class="action" id="code-80" title="LEFT">LEFT</button>
|
||||||
|
<button class="action" id="code-81" title="DOWN">DOWN</button>
|
||||||
|
<button class="action" id="code-82" title="UP">UP</button>
|
||||||
|
<button class="action" id="code-79" title="RIGHT">RIGHT</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
Keypad:<br>
|
||||||
|
<button class="action" id="code-83" title="NUMLOCK">NUMLOCK</button>
|
||||||
|
<button class="action" id="code-84" title="KP_SLASH">KP_SLASH</button>
|
||||||
|
<button class="action" id="code-85" title="KP_ASTERISK">KP_ASTERISK</button>
|
||||||
|
<button class="action" id="code-86" title="KP_MINUS">KP_MINUS</button>
|
||||||
|
<button class="action" id="code-87" title="KP_PLUS">KP_PLUS</button>
|
||||||
|
<button class="action" id="code-88" title="KP_ENTER">KP_ENTER</button>
|
||||||
|
<button class="action" id="code-99" title="KP_DOT">KP_DOT</button>
|
||||||
|
<button class="action" id="code-103" title="KP_EQUAL">KP_EQUAL</button>
|
||||||
|
<button class="action" id="code-133" title="KP_COMMA">KP_COMMA</button>
|
||||||
|
<!--
|
||||||
|
<button class="action" id="code-134" title="KP_EQUAL_AS400">KP_EQUAL_AS400</button>
|
||||||
|
-->
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-89" title="KP_1">KP_1</button>
|
||||||
|
<button class="action" id="code-90" title="KP_2">KP_2</button>
|
||||||
|
<button class="action" id="code-91" title="KP_3">KP_3</button>
|
||||||
|
<button class="action" id="code-92" title="KP_4">KP_4</button>
|
||||||
|
<button class="action" id="code-93" title="KP_5">KP_5</button>
|
||||||
|
<button class="action" id="code-94" title="KP_6">KP_6</button>
|
||||||
|
<button class="action" id="code-95" title="KP_7">KP_7</button>
|
||||||
|
<button class="action" id="code-96" title="KP_8">KP_8</button>
|
||||||
|
<button class="action" id="code-97" title="KP_9">KP_9</button>
|
||||||
|
<button class="action" id="code-98" title="KP_0">KP_0</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
Japanese:<br>
|
||||||
|
<button class="action" id="code-135" title="INT1">INT1</button>
|
||||||
|
<button class="action" id="code-136" title="INT2">INT2</button>
|
||||||
|
<button class="action" id="code-137" title="INT3">INT3</button>
|
||||||
|
<button class="action" id="code-138" title="INT4">INT4</button>
|
||||||
|
<button class="action" id="code-139" title="INT5">INT5</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
Korean:<br>
|
||||||
|
<button class="action" id="code-144" title="LANG1">LANG1</button>
|
||||||
|
<button class="action" id="code-145" title="LANG2">LANG2</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Mechanical Locking key support:<br>
|
||||||
|
<button class="action" id="code-130" title="LOCKING_CAPS">LOCKING_CAPS</button>
|
||||||
|
<button class="action" id="code-131" title="LOCKING_NUM">LOCKING_NUM</button>
|
||||||
|
<button class="action" id="code-132" title="LOCKING_SCROLL">LOCKING_SCROLL</button>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<button class="action" id="code-140" title="INT6">INT6</button>
|
||||||
|
<button class="action" id="code-141" title="INT7">INT7</button>
|
||||||
|
<button class="action" id="code-142" title="INT8">INT8</button>
|
||||||
|
<button class="action" id="code-143" title="INT9">INT9</button>
|
||||||
|
|
||||||
|
<button class="action" id="code-146" title="LANG3">LANG3</button>
|
||||||
|
<button class="action" id="code-147" title="LANG4">LANG4</button>
|
||||||
|
<button class="action" id="code-148" title="LANG5">LANG5</button>
|
||||||
|
<button class="action" id="code-149" title="LANG6">LANG6</button>
|
||||||
|
<button class="action" id="code-150" title="LANG7">LANG7</button>
|
||||||
|
<button class="action" id="code-151" title="LANG8">LANG8</button>
|
||||||
|
<button class="action" id="code-152" title="LANG9">LANG9</button>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<button class="action" id="code-116" title="EXECUTE">EXECUTE</button>
|
||||||
|
<button class="action" id="code-117" title="HELP">HELP</button>
|
||||||
|
<button class="action" id="code-118" title="MENU">MENU</button>
|
||||||
|
<button class="action" id="code-119" title="SELECT">SELECT</button>
|
||||||
|
<button class="action" id="code-120" title="STOP">STOP</button>
|
||||||
|
<button class="action" id="code-121" title="AGAIN">AGAIN</button>
|
||||||
|
<button class="action" id="code-122" title="UNDO">UNDO</button>
|
||||||
|
<button class="action" id="code-123" title="CUT">CUT</button>
|
||||||
|
<button class="action" id="code-124" title="COPY">COPY</button>
|
||||||
|
<button class="action" id="code-125" title="PASTE">PASTE</button>
|
||||||
|
<button class="action" id="code-126" title="FIND">FIND</button>
|
||||||
|
<button class="action" id="code-127" title="_MUTE">_MUTE</button>
|
||||||
|
<button class="action" id="code-128" title="_VOLUP">_VOLUP</button>
|
||||||
|
<button class="action" id="code-129" title="_VOLDOWN">_VOLDOWN</button>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<button class="action" id="code-102" title="POWER">POWER</button>
|
||||||
|
<button class="action" id="code-153" title="ALT_ERASE">ALT_ERASE</button>
|
||||||
|
<button class="action" id="code-154" title="SYSREQ">SYSREQ</button>
|
||||||
|
<button class="action" id="code-155" title="CANCEL">CANCEL</button>
|
||||||
|
<button class="action" id="code-156" title="CLEAR">CLEAR</button>
|
||||||
|
<button class="action" id="code-157" title="PRIOR">PRIOR</button>
|
||||||
|
<button class="action" id="code-158" title="RETURN">RETURN</button>
|
||||||
|
<button class="action" id="code-159" title="SEPARATOR">SEPARATOR</button>
|
||||||
|
<button class="action" id="code-160" title="OUT">OUT</button>
|
||||||
|
<button class="action" id="code-161" title="OPER">OPER</button>
|
||||||
|
<button class="action" id="code-162" title="CLEAR_AGAIN">CLEAR_AGAIN</button>
|
||||||
|
<button class="action" id="code-163" title="CRSEL">CRSEL</button>
|
||||||
|
<button class="action" id="code-164" title="EXSEL">EXSEL</button>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Special key: System, Media and Mouse key -->
|
||||||
|
<div id="tabs-special">
|
||||||
|
<button class="action" id="code-0">NO</button>
|
||||||
|
<button class="action" id="code-1">TRNS</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
System:<br>
|
||||||
|
<button class="action" id="code-165"></button>
|
||||||
|
<button class="action" id="code-166"></button>
|
||||||
|
<button class="action" id="code-167"></button>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Volume:<br>
|
||||||
|
<button class="action" id="code-168"></button>
|
||||||
|
<button class="action" id="code-169"></button>
|
||||||
|
<button class="action" id="code-170"></button>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Media:<br>
|
||||||
|
<button class="action" id="code-171"></button>
|
||||||
|
<button class="action" id="code-172"></button>
|
||||||
|
<button class="action" id="code-173"></button>
|
||||||
|
<button class="action" id="code-174"></button>
|
||||||
|
<button class="action" id="code-175"></button>
|
||||||
|
<button class="action" id="code-176"></button>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Application:<br>
|
||||||
|
<button class="action" id="code-177"></button>
|
||||||
|
<button class="action" id="code-178"></button>
|
||||||
|
<button class="action" id="code-179"></button>
|
||||||
|
<br>
|
||||||
|
Web:<br>
|
||||||
|
<button class="action" id="code-180"></button>
|
||||||
|
<button class="action" id="code-181"></button>
|
||||||
|
<button class="action" id="code-182"></button>
|
||||||
|
<button class="action" id="code-183"></button>
|
||||||
|
<button class="action" id="code-184"></button>
|
||||||
|
<button class="action" id="code-185"></button>
|
||||||
|
<button class="action" id="code-186"></button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<button class="action" id="code-187"></button>
|
||||||
|
<button class="action" id="code-188"></button>
|
||||||
|
<button class="action" id="code-189"></button>
|
||||||
|
<button class="action" id="code-190"></button>
|
||||||
|
<button class="action" id="code-191"></button>
|
||||||
|
-->
|
||||||
|
|
||||||
|
Mouse key:<br>
|
||||||
|
<button class="action" id="code-240"></button>
|
||||||
|
<button class="action" id="code-241"></button>
|
||||||
|
<button class="action" id="code-242"></button>
|
||||||
|
<button class="action" id="code-243"></button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-244"></button>
|
||||||
|
<button class="action" id="code-245"></button>
|
||||||
|
<button class="action" id="code-246"></button>
|
||||||
|
<button class="action" id="code-247"></button>
|
||||||
|
<button class="action" id="code-248"></button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-249"></button>
|
||||||
|
<button class="action" id="code-250"></button>
|
||||||
|
<button class="action" id="code-251"></button>
|
||||||
|
<button class="action" id="code-252"></button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-253"></button>
|
||||||
|
<button class="action" id="code-254"></button>
|
||||||
|
<button class="action" id="code-255"></button>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Layer -->
|
||||||
|
<div id="tabs-layer">
|
||||||
|
<button class="action" id="code-0">NO</button>
|
||||||
|
<button class="action" id="code-1">TRNS</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- TODO: layer actions -->
|
||||||
|
<!-- FN0-31 -->
|
||||||
|
Layer Switch Momentary:<br>
|
||||||
|
<button class="action" id="code-192"></button>
|
||||||
|
<button class="action" id="code-193"></button>
|
||||||
|
<button class="action" id="code-194"></button>
|
||||||
|
<button class="action" id="code-195"></button>
|
||||||
|
<button class="action" id="code-196"></button>
|
||||||
|
<button class="action" id="code-197"></button>
|
||||||
|
<button class="action" id="code-198"></button>
|
||||||
|
<br>
|
||||||
|
Layer Switch Toggle:<br>
|
||||||
|
<button class="action" id="code-199"></button>
|
||||||
|
<button class="action" id="code-200"></button>
|
||||||
|
<button class="action" id="code-201"></button>
|
||||||
|
<br>
|
||||||
|
Layer Switch with Tap Toggle:<br>
|
||||||
|
<button class="action" id="code-202"></button>
|
||||||
|
<button class="action" id="code-203"></button>
|
||||||
|
<button class="action" id="code-204"></button>
|
||||||
|
<br>
|
||||||
|
Layer switch with Tap key:<br>
|
||||||
|
<button class="action" id="code-205"></button>
|
||||||
|
<button class="action" id="code-206"></button>
|
||||||
|
<button class="action" id="code-207"></button>
|
||||||
|
<button class="action" id="code-208"></button>
|
||||||
|
<button class="action" id="code-209"></button>
|
||||||
|
<button class="action" id="code-210"></button>
|
||||||
|
<button class="action" id="code-211"></button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
Modifier with special function:<br>
|
||||||
|
<button class="action" id="code-212"></button>
|
||||||
|
<button class="action" id="code-213"></button>
|
||||||
|
<button class="action" id="code-214"></button>
|
||||||
|
<button class="action" id="code-215"></button>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-216"></button>
|
||||||
|
<button class="action" id="code-217"></button>
|
||||||
|
<button class="action" id="code-218"></button>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-219"></button>
|
||||||
|
<button class="action" id="code-220"></button>
|
||||||
|
<button class="action" id="code-221"></button>
|
||||||
|
<br>
|
||||||
|
<button class="action" id="code-222"></button>
|
||||||
|
<button class="action" id="code-223"></button>
|
||||||
|
<br>
|
||||||
|
<p>
|
||||||
|
See <a href="https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md#3-layer-switching-example" target="_blank">this</a> for detail of Layer Switching.<br>
|
||||||
|
See <a href="https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md#41-tap-key" target="_blank">this</a> for Tap key(Dual-role Modifier).<br>
|
||||||
|
See <a href="https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md#43-one-shot-modifier" target="_blank">this</a> for OneShot Modifier.</p>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>Firmware Hex File Download:</h3>
|
||||||
|
<button id="keymap-download" title="save file">Download</button>
|
||||||
|
<a id="hex-download" style="display:none" ></a>
|
||||||
|
|
||||||
|
<h3>Share URL:</h3>
|
||||||
|
<textarea id="share-url" rows="10" cols="80"></textarea>
|
||||||
|
<br/>
|
||||||
|
<button id="keymap-share" title="Share">Share</button>
|
||||||
|
<button id="shorten-url" title="Shorten">Shorten</button>
|
||||||
|
|
||||||
|
<h3>Keymap Output(for debug):</h3>
|
||||||
|
<textarea id="keymap-output" rows="20" cols="80"></textarea>
|
||||||
|
<br/>
|
||||||
|
<button id="keymap-json-generate" title="generate JSON">JSON</button>
|
||||||
|
<button id="keymap-source-generate" title="generate C source code">C source</button>
|
||||||
|
<button id="keymap-hex-generate" title="generate Hex">Hex</button>
|
||||||
|
<button id="keymap-encode" title="generate URL">encode URL</button>
|
||||||
|
<button id="keymap-decode" title="decode URL">decode URL</button>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
115
editor/alps64/keyboard.css
Normal file
115
editor/alps64/keyboard.css
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
html * {
|
||||||
|
font-family:helvetica, arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.key {
|
||||||
|
box-shadow:inset -3px -3px 5px 5px #ebebeb;
|
||||||
|
background-color:#ffffff;
|
||||||
|
border-radius:6px;
|
||||||
|
border:2px solid #dcdcdc;
|
||||||
|
display:inline-block;
|
||||||
|
float: left;
|
||||||
|
color:#777777;
|
||||||
|
font-family:helvetica, arial, sans-serif;
|
||||||
|
font-size:16px;
|
||||||
|
font-weight:bold;
|
||||||
|
text-decoration:none;
|
||||||
|
padding:4px 16px 16px 4px;
|
||||||
|
width: 25px;
|
||||||
|
height: 25px;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0px 1px 1px 0px;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
.key:hover {
|
||||||
|
background-color:#ebebeb;
|
||||||
|
}
|
||||||
|
.key:active {
|
||||||
|
}
|
||||||
|
.key:focus {
|
||||||
|
}
|
||||||
|
.key-editing {
|
||||||
|
background-color:#b4b4b4;
|
||||||
|
border:2px solid #7f7f7f;
|
||||||
|
position:relative;
|
||||||
|
top:2px;
|
||||||
|
}
|
||||||
|
/* This imageless css button was generated by CSSButtonGenerator.com */
|
||||||
|
|
||||||
|
/* Key unit and pixel
|
||||||
|
* key unit: 1.00 1.25 1.50 1.75 2.00
|
||||||
|
* px: 50 62.5 75 87.5 100
|
||||||
|
*
|
||||||
|
* Key CSS Metrics
|
||||||
|
* +---------------------------+
|
||||||
|
* | margin |
|
||||||
|
* | +-----------------------+ |
|
||||||
|
* | |border 2 | |
|
||||||
|
* | | +-------------------+ | |
|
||||||
|
* | | |padding 4 | | |
|
||||||
|
* | | | +--------------+ | | |
|
||||||
|
* |0|2|4|width x height|16|2|1|
|
||||||
|
* | | | +--------------+ | | |
|
||||||
|
* | | | 16 | | |
|
||||||
|
* | | +-------------------+ | |
|
||||||
|
* | | 2 | |
|
||||||
|
* | +-----------------------+ |
|
||||||
|
* | 1 |
|
||||||
|
* +---------------------------+
|
||||||
|
* width/height:25 + (margin:0 + border:2 + padding:4 + padding:16 + border:2 + margin:1) = 50px
|
||||||
|
*/
|
||||||
|
.btn100 { width:25px; } /* 50 - 25 */
|
||||||
|
.btn125 { width:37.5px; } /* 62.5 - 25 */
|
||||||
|
.btn150 { width:50px; } /* 75 - 25 */
|
||||||
|
.btn175 { width:62.5px; } /* 87.5 - 25 */
|
||||||
|
.btn200 { width:75px; } /* 100 - 25 */
|
||||||
|
.btn225 { width:87.5px; } /* 112.5 - 25 */
|
||||||
|
.btn250 { width:100; } /* 125 - 25 */
|
||||||
|
.btn275 { width:112.5px; } /* 137.5 - 25 */
|
||||||
|
.btn600 { width:275px; } /* 300 - 25 */
|
||||||
|
.btn625 { width:287.5px; } /* 312.5 - 25 */
|
||||||
|
.btn700 { width:325px; } /* 350 - 25 */
|
||||||
|
.btn750 { width:350px; } /* 375 - 25 */
|
||||||
|
|
||||||
|
.spc100 { width:25px; visibility:hidden; }
|
||||||
|
.spc125 { width:37.5px; visibility:hidden; }
|
||||||
|
.spc150 { width:50px; visibility:hidden; }
|
||||||
|
.spc175 { width:62.5px; visibility:hidden; }
|
||||||
|
.spc200 { width 75px; visibility:hidden; }
|
||||||
|
|
||||||
|
.keyboard-row {
|
||||||
|
width: auto;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.keyboard-outline {
|
||||||
|
}
|
||||||
|
|
||||||
|
.keyboard-pane {
|
||||||
|
width: 750px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.action {
|
||||||
|
font-size:16px;
|
||||||
|
font-weight:bold;
|
||||||
|
min-width: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.keycode_tabs {
|
||||||
|
width: 750px;
|
||||||
|
overflow: auto;
|
||||||
|
font-size:14px;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* http://www.w3schools.com/cssref/css3_pr_resize.asp */
|
||||||
|
.resizable {
|
||||||
|
resize: both;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
527
editor/alps64/keymap_editor.js
Normal file
527
editor/alps64/keymap_editor.js
Normal file
@ -0,0 +1,527 @@
|
|||||||
|
/*
|
||||||
|
* TMK keymap editor
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Share URL
|
||||||
|
*/
|
||||||
|
function encode_keymap(keymap)
|
||||||
|
{
|
||||||
|
return window.btoa(JSON.stringify(keymap));
|
||||||
|
}
|
||||||
|
|
||||||
|
function decode_keymap(hash)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return JSON.parse(window.atob(hash));
|
||||||
|
} catch (err) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hex file
|
||||||
|
*/
|
||||||
|
function hexstr2(b)
|
||||||
|
{
|
||||||
|
return ('0'+ b.toString(16)).substr(-2).toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function hex_line(address, record_type, data)
|
||||||
|
{
|
||||||
|
var sum = 0;
|
||||||
|
sum += data.length;
|
||||||
|
sum += (address >> 8);
|
||||||
|
sum += (address & 0xff);
|
||||||
|
sum += record_type;
|
||||||
|
|
||||||
|
var line = '';
|
||||||
|
line += ':';
|
||||||
|
line += hexstr2(data.length);
|
||||||
|
line += hexstr2(address >> 8);
|
||||||
|
line += hexstr2(address & 0xff);
|
||||||
|
line += hexstr2(record_type);
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
sum = (sum + data[i]);
|
||||||
|
line += hexstr2(data[i]);
|
||||||
|
}
|
||||||
|
line += hexstr2((~sum + 1)&0xff); // Checksum
|
||||||
|
line +="\r\n";
|
||||||
|
return line;
|
||||||
|
}
|
||||||
|
|
||||||
|
function hex_eof()
|
||||||
|
{
|
||||||
|
return ":00000001FF\r\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
function flatten(array)
|
||||||
|
{
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
function hex_output(address, data) {
|
||||||
|
var output = '';
|
||||||
|
var line = [];
|
||||||
|
|
||||||
|
// TODO: refine: flatten data into one dimension array
|
||||||
|
[].concat.apply([], [].concat.apply([], data)).forEach(function(e) {
|
||||||
|
line.push(e);
|
||||||
|
if (line.length == 16) {
|
||||||
|
output += hex_line(address, 0x00, line);
|
||||||
|
address += 16;
|
||||||
|
line.length = 0; // clear array
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (line.length > 0) {
|
||||||
|
output += hex_line(address, 0x00, line);
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Source file
|
||||||
|
*/
|
||||||
|
function source_output(keymaps) {
|
||||||
|
var output = '';
|
||||||
|
// fn actions
|
||||||
|
output += "/*\n";
|
||||||
|
output += " * Keymap for " + KEYBOARD_ID + "\n";;
|
||||||
|
output += " * generated by tmk keymap editor\n";
|
||||||
|
output += " */\n";
|
||||||
|
output += "#include <stdint.h>\n";
|
||||||
|
output += "#include <stdbool.h>\n";
|
||||||
|
output += "#include <avr/pgmspace.h>\n";
|
||||||
|
output += "#include \"keycode.h\"\n";
|
||||||
|
output += "#include \"action.h\"\n";
|
||||||
|
output += "#include \"action_macro.h\"\n";
|
||||||
|
output += "#include \"keymap.h\"\n\n";
|
||||||
|
|
||||||
|
output += "#ifdef KEYMAP_SECTION\n";
|
||||||
|
output += "const uint16_t fn_actions[] __attribute__ ((section (\".keymap.fn_actions\"))) = {\n";
|
||||||
|
output += "#else\n";
|
||||||
|
output += "static const uint16_t fn_actions[] PROGMEM = {\n";
|
||||||
|
output += "#endif\n";
|
||||||
|
output += " [0] = ACTION_LAYER_MOMENTARY(1),\n";
|
||||||
|
output += " [1] = ACTION_LAYER_MOMENTARY(2),\n";
|
||||||
|
output += " [2] = ACTION_LAYER_MOMENTARY(3),\n";
|
||||||
|
output += " [3] = ACTION_LAYER_MOMENTARY(4),\n";
|
||||||
|
output += " [4] = ACTION_LAYER_MOMENTARY(5),\n";
|
||||||
|
output += " [5] = ACTION_LAYER_MOMENTARY(6),\n";
|
||||||
|
output += " [6] = ACTION_LAYER_MOMENTARY(7),\n";
|
||||||
|
output += " [7] = ACTION_LAYER_TOGGLE(1),\n";
|
||||||
|
output += " [8] = ACTION_LAYER_TOGGLE(2),\n";
|
||||||
|
output += " [9] = ACTION_LAYER_TOGGLE(3),\n";
|
||||||
|
output += " [10] = ACTION_LAYER_TAP_TOGGLE(1),\n";
|
||||||
|
output += " [11] = ACTION_LAYER_TAP_TOGGLE(2),\n";
|
||||||
|
output += " [12] = ACTION_LAYER_TAP_TOGGLE(3),\n";
|
||||||
|
output += " [13] = ACTION_LAYER_TAP_KEY(1, KC_A),\n";
|
||||||
|
output += " [14] = ACTION_LAYER_TAP_KEY(2, KC_F),\n";
|
||||||
|
output += " [15] = ACTION_LAYER_TAP_KEY(3, KC_J),\n";
|
||||||
|
output += " [16] = ACTION_LAYER_TAP_KEY(4, KC_SPACE),\n";
|
||||||
|
output += " [17] = ACTION_LAYER_TAP_KEY(5, KC_SCOLON),\n";
|
||||||
|
output += " [18] = ACTION_LAYER_TAP_KEY(6, KC_QUOTE),\n";
|
||||||
|
output += " [19] = ACTION_LAYER_TAP_KEY(7, KC_SLASH),\n";
|
||||||
|
output += " [20] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_SPACE),\n";
|
||||||
|
output += " [21] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_SPACE),\n";
|
||||||
|
output += " [22] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_QUOTE),\n";
|
||||||
|
output += " [23] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENTER),\n";
|
||||||
|
output += " [24] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC),\n";
|
||||||
|
output += " [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPACE),\n";
|
||||||
|
output += " [26] = ACTION_MODS_ONESHOT(MOD_LCTL),\n";
|
||||||
|
output += " [27] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC),\n";
|
||||||
|
output += " [28] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_BSPACE),\n";
|
||||||
|
output += " [29] = ACTION_MODS_ONESHOT(MOD_LSFT),\n";
|
||||||
|
output += " [30] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRAVE),\n";
|
||||||
|
output += " [31] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_BSLASH),\n";
|
||||||
|
output += "};\n\n";
|
||||||
|
|
||||||
|
// keymaps
|
||||||
|
output += "#ifdef KEYMAP_SECTION\n";
|
||||||
|
output += "const uint8_t keymaps[][";
|
||||||
|
output += keymaps[0].length; // row
|
||||||
|
output += "][";
|
||||||
|
output += keymaps[0][0].length; // col
|
||||||
|
output += "] __attribute__ ((section (\".keymap.keymaps\"))) = {\n";
|
||||||
|
output += "#else\n";
|
||||||
|
output += "static const uint8_t keymaps[][";
|
||||||
|
output += keymaps[0].length; // row
|
||||||
|
output += "][";
|
||||||
|
output += keymaps[0][0].length; // col
|
||||||
|
output += "] PROGMEM = {\n";
|
||||||
|
output += "#endif\n";
|
||||||
|
for (var i in keymaps) {
|
||||||
|
output += " {\n";
|
||||||
|
for (var j in keymaps[i]) {
|
||||||
|
output += " { ";
|
||||||
|
for (var k in keymaps[i][j]) {
|
||||||
|
output += '0x' + ('0' + keymaps[i][j][k].toString(16)).substr(-2);
|
||||||
|
output += ',';
|
||||||
|
}
|
||||||
|
output += " },\n";
|
||||||
|
}
|
||||||
|
output += " },\n";
|
||||||
|
}
|
||||||
|
output += "};\n\n";
|
||||||
|
output += "/* translates key to keycode */\n";
|
||||||
|
output += "uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)\n";
|
||||||
|
output += "{\n";
|
||||||
|
output += " return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);\n";
|
||||||
|
output += "}\n";
|
||||||
|
output += "\n";
|
||||||
|
output += "/* translates Fn index to action */\n";
|
||||||
|
output += "action_t keymap_fn_to_action(uint8_t keycode)\n";
|
||||||
|
output += "{\n";
|
||||||
|
output += " action_t action;\n";
|
||||||
|
output += " if (FN_INDEX(keycode) < sizeof(fn_actions) / sizeof(fn_actions[0])) {\n";
|
||||||
|
output += " action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]);\n";
|
||||||
|
output += " } else {\n";
|
||||||
|
output += " action.code = ACTION_NO;\n";
|
||||||
|
output += " }\n";
|
||||||
|
output += " return action;\n";
|
||||||
|
output += "}\n";
|
||||||
|
return output;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* keycodes
|
||||||
|
*/
|
||||||
|
var code_display = [
|
||||||
|
// {id, name(text), description(tooltip)}
|
||||||
|
{id: 'NO ', name: 'NO', desc: 'No action'},
|
||||||
|
{id: 'TRNS', name: 'TRNS', desc: 'Transparent'},
|
||||||
|
{id: 'POST_FAIL', name: 'POST_FAIL', desc: 'POST_FAIL'},
|
||||||
|
{id: 'UNDEFINED', name: 'UNDEFINED', desc: 'UNDEFINED'},
|
||||||
|
{id: 'A', name: 'A', desc: 'A'},
|
||||||
|
{id: 'B', name: 'B', desc: 'B'},
|
||||||
|
{id: 'C', name: 'C', desc: 'C'},
|
||||||
|
{id: 'D', name: 'D', desc: 'D'},
|
||||||
|
{id: 'E', name: 'E', desc: 'E'},
|
||||||
|
{id: 'F', name: 'F', desc: 'F'},
|
||||||
|
{id: 'G', name: 'G', desc: 'G'},
|
||||||
|
{id: 'H', name: 'H', desc: 'H'},
|
||||||
|
{id: 'I', name: 'I', desc: 'I'},
|
||||||
|
{id: 'J', name: 'J', desc: 'J'},
|
||||||
|
{id: 'K', name: 'K', desc: 'K'},
|
||||||
|
{id: 'L', name: 'L', desc: 'L'},
|
||||||
|
{id: 'M', name: 'M', desc: 'M'},
|
||||||
|
{id: 'N', name: 'N', desc: 'N'},
|
||||||
|
{id: 'O', name: 'O', desc: 'O'},
|
||||||
|
{id: 'P', name: 'P', desc: 'P'},
|
||||||
|
{id: 'Q', name: 'Q', desc: 'Q'},
|
||||||
|
{id: 'R', name: 'R', desc: 'R'},
|
||||||
|
{id: 'S', name: 'S', desc: 'S'},
|
||||||
|
{id: 'T', name: 'T', desc: 'T'},
|
||||||
|
{id: 'U', name: 'U', desc: 'U'},
|
||||||
|
{id: 'V', name: 'V', desc: 'V'},
|
||||||
|
{id: 'W', name: 'W', desc: 'W'},
|
||||||
|
{id: 'X', name: 'X', desc: 'X'},
|
||||||
|
{id: 'Y', name: 'Y', desc: 'Y'},
|
||||||
|
{id: 'Z', name: 'Z', desc: 'Z'},
|
||||||
|
{id: '1', name: '1', desc: '1'},
|
||||||
|
{id: '2', name: '2', desc: '2'},
|
||||||
|
{id: '3', name: '3', desc: '3'},
|
||||||
|
{id: '4', name: '4', desc: '4'},
|
||||||
|
{id: '5', name: '5', desc: '5'},
|
||||||
|
{id: '6', name: '6', desc: '6'},
|
||||||
|
{id: '7', name: '7', desc: '7'},
|
||||||
|
{id: '8', name: '8', desc: '8'},
|
||||||
|
{id: '9', name: '9', desc: '9'},
|
||||||
|
{id: '0', name: '0', desc: '0'},
|
||||||
|
{id: 'ENT', name: 'Enter', desc: 'ENTER'},
|
||||||
|
{id: 'ESC', name: 'Esc', desc: 'Escape'},
|
||||||
|
{id: 'BSPC', name: 'Back space', desc: 'Backspace'},
|
||||||
|
{id: 'TAB', name: 'Tab', desc: 'Tab'},
|
||||||
|
{id: 'SPC', name: 'Space', desc: 'Space'},
|
||||||
|
{id: 'MINS', name: '-', desc: 'MINUS'},
|
||||||
|
{id: 'EQL', name: '=', desc: 'EQUAL'},
|
||||||
|
{id: 'LBRC', name: '[', desc: 'Left Bracket'},
|
||||||
|
{id: 'RBRC', name: ']', desc: 'Right Bracket'},
|
||||||
|
{id: 'BSLS', name: "\\", desc: 'Backslash'},
|
||||||
|
{id: 'NUHS', name: 'ISO #', desc: 'Non-US Hash'},
|
||||||
|
{id: 'SCLN', name: ';', desc: 'Semicolon'},
|
||||||
|
{id: 'QUOT', name: "'", desc: 'Quote'},
|
||||||
|
{id: 'GRV ', name: '`', desc: 'Grave'},
|
||||||
|
{id: 'COMM', name: ',', desc: 'Comma'},
|
||||||
|
{id: 'DOT ', name: '.', desc: 'Dot'},
|
||||||
|
{id: 'SLSH', name: '/', desc: 'Slash'},
|
||||||
|
{id: 'CAPS', name: 'Caps Lock', desc: 'Need this? Sure? :)'},
|
||||||
|
{id: 'F1 ', name: 'F1', desc: 'F1'},
|
||||||
|
{id: 'F2 ', name: 'F2', desc: 'F2'},
|
||||||
|
{id: 'F3 ', name: 'F3', desc: 'F3'},
|
||||||
|
{id: 'F4 ', name: 'F4', desc: 'F4'},
|
||||||
|
{id: 'F5 ', name: 'F5', desc: 'F5'},
|
||||||
|
{id: 'F6 ', name: 'F6', desc: 'F6'},
|
||||||
|
{id: 'F7 ', name: 'F7', desc: 'F7'},
|
||||||
|
{id: 'F8 ', name: 'F8', desc: 'F8'},
|
||||||
|
{id: 'F9 ', name: 'F9', desc: 'F9'},
|
||||||
|
{id: 'F10 ', name: 'F10', desc: 'F10'},
|
||||||
|
{id: 'F11 ', name: 'F11', desc: 'F11'},
|
||||||
|
{id: 'F12 ', name: 'F12', desc: 'F12'},
|
||||||
|
{id: 'PSCR', name: 'Print Screen', desc: 'Print Screen'},
|
||||||
|
{id: 'SLCK', name: 'Scroll Lock', desc: 'Scroll Lock'},
|
||||||
|
{id: 'PAUS', name: 'Pause', desc: 'Pause'},
|
||||||
|
{id: 'INS ', name: 'Insert', desc: 'Insert'},
|
||||||
|
{id: 'HOME', name: 'Home', desc: 'Home'},
|
||||||
|
{id: 'PGUP', name: 'Page Up', desc: 'Page Up'},
|
||||||
|
{id: 'DEL ', name: 'Delete', desc: 'Delete'},
|
||||||
|
{id: 'END ', name: 'End', desc: 'End'},
|
||||||
|
{id: 'PGDN', name: 'Page Down', desc: 'Page Down'},
|
||||||
|
{id: 'RGHT', name: '\u2192', desc: 'Right'},
|
||||||
|
{id: 'LEFT', name: '\u2190', desc: 'Left'},
|
||||||
|
{id: 'DOWN', name: '\u2193', desc: 'Down'},
|
||||||
|
{id: 'UP ', name: '\u2191', desc: 'Up'},
|
||||||
|
{id: 'NLCK', name: 'Num Lock', desc: 'Num Lock'},
|
||||||
|
{id: 'PSLS', name: 'P/', desc: 'Keypad Slash'},
|
||||||
|
{id: 'PAST', name: 'P*', desc: 'Keypad Asterisk'},
|
||||||
|
{id: 'PMNS', name: 'P-', desc: 'Keypad Minus'},
|
||||||
|
{id: 'PPLS', name: 'P+', desc: 'Keypad Plus'},
|
||||||
|
{id: 'PENT', name: 'P\u21A9', desc: 'Keypad Enter'},
|
||||||
|
{id: 'P1 ', name: 'P1', desc: 'Keypad 1'},
|
||||||
|
{id: 'P2 ', name: 'P2', desc: 'Keypad 2'},
|
||||||
|
{id: 'P3 ', name: 'P3', desc: 'Keypad 3'},
|
||||||
|
{id: 'P4 ', name: 'P4', desc: 'Keypad 4'},
|
||||||
|
{id: 'P5 ', name: 'P5', desc: 'Keypad 5'},
|
||||||
|
{id: 'P6 ', name: 'P6', desc: 'Keypad 6'},
|
||||||
|
{id: 'P7 ', name: 'P7', desc: 'Keypad 7'},
|
||||||
|
{id: 'P8 ', name: 'P8', desc: 'Keypad 8'},
|
||||||
|
{id: 'P9 ', name: 'P9', desc: 'Keypad 9'},
|
||||||
|
{id: 'P0 ', name: 'P0', desc: 'Keypad 0'},
|
||||||
|
{id: 'PDOT', name: 'P.', desc: 'Keypad Dot'},
|
||||||
|
{id: 'NUBS', name: 'ISO \\', desc: 'Non-US Backslash'},
|
||||||
|
{id: 'APP ', name: 'Application', desc: 'Application'},
|
||||||
|
{id: 'POWER', name: '_Power', desc: 'Power(Not work on Windows)'},
|
||||||
|
{id: 'PEQL', name: 'P=', desc: 'Keymapd Equal'},
|
||||||
|
{id: 'F13 ', name: 'F13', desc: 'F13'},
|
||||||
|
{id: 'F14 ', name: 'F14', desc: 'F14'},
|
||||||
|
{id: 'F15 ', name: 'F15', desc: 'F15'},
|
||||||
|
{id: 'F16 ', name: 'F16', desc: 'F16'},
|
||||||
|
{id: 'F17 ', name: 'F17', desc: 'F17'},
|
||||||
|
{id: 'F18 ', name: 'F18', desc: 'F18'},
|
||||||
|
{id: 'F19 ', name: 'F19', desc: 'F19'},
|
||||||
|
{id: 'F20 ', name: 'F20', desc: 'F20'},
|
||||||
|
{id: 'F21 ', name: 'F21', desc: 'F21'},
|
||||||
|
{id: 'F22 ', name: 'F22', desc: 'F22'},
|
||||||
|
{id: 'F23 ', name: 'F23', desc: 'F23'},
|
||||||
|
{id: 'F24 ', name: 'F24', desc: 'F24'},
|
||||||
|
{id: 'EXECUTE', name: 'EXECUTE', desc: 'EXECUTE'},
|
||||||
|
{id: 'HELP', name: 'HELP', desc: 'HELP'},
|
||||||
|
{id: 'MENU', name: 'MENU', desc: 'MENU'},
|
||||||
|
{id: 'SELECT', name: 'SELECT', desc: 'SELECT'},
|
||||||
|
{id: 'STOP', name: 'STOP', desc: 'STOP'},
|
||||||
|
{id: 'AGAIN', name: 'AGAIN', desc: 'AGAIN'},
|
||||||
|
{id: 'UNDO', name: 'UNDO', desc: 'UNDO'},
|
||||||
|
{id: 'CUT', name: 'CUT', desc: 'CUT'},
|
||||||
|
{id: 'COPY', name: 'COPY', desc: 'COPY'},
|
||||||
|
{id: 'PASTE', name: 'PASTE', desc: 'PASTE'},
|
||||||
|
{id: 'FIND', name: 'FIND', desc: 'FIND'},
|
||||||
|
{id: '_MUTE', name: '_MUTE', desc: '_MUTE(Not work on Windows)'},
|
||||||
|
{id: '_VOLUP', name: '_VOLUP', desc: '_VOLUP(Not work on Windows)'},
|
||||||
|
{id: '_VOLDOWN', name: '_VOLDOWN', desc: '_VOLDOWN(Not work on Windows)'},
|
||||||
|
{id: 'LCAP', name: 'Locking Caps Lock', desc: 'Locking Caps Lock'},
|
||||||
|
{id: 'LNUM', name: 'Locking Num Lock', desc: 'Locking Num Lock'},
|
||||||
|
{id: 'LSCR', name: 'Locking Scroll Lock', desc: 'Locking Scroll Lock'},
|
||||||
|
{id: 'PCMM', name: 'P,', desc: 'Keypad Comma'},
|
||||||
|
{id: 'KP_EQUAL_AS400', name: 'P= (AS400)', desc: 'Keypad Equal (AS400)'},
|
||||||
|
{id: 'INT1', name: '\u308D', desc: 'Japanese RO'},
|
||||||
|
{id: 'INT2', name: '\u3072\u3089\u304c\u306a', desc: 'Japanese Hiragana'},
|
||||||
|
{id: 'INT3', name: '\uffe5', desc: 'Japanese Yen'},
|
||||||
|
{id: 'INT4', name: '\u5909\u63db', desc: 'Japanese Henkan'},
|
||||||
|
{id: 'INT5', name: '\u7121\u5909\u63db', desc: 'Japanese Muhenkan'},
|
||||||
|
{id: 'INT6', name: 'INT6', desc: 'INT6'},
|
||||||
|
{id: 'INT7', name: 'INT7', desc: 'INT7'},
|
||||||
|
{id: 'INT8', name: 'INT8', desc: 'INT8'},
|
||||||
|
{id: 'INT9', name: 'INT9', desc: 'INT9'},
|
||||||
|
{id: 'LANG1', name: '\ud55c/\uc601', desc: 'Korean Hangul/English'},
|
||||||
|
{id: 'LANG2', name: '\ud55c\uc790', desc: 'Korean Hanja'},
|
||||||
|
{id: 'LANG3', name: 'LANG3', desc: 'LANG3'},
|
||||||
|
{id: 'LANG4', name: 'LANG4', desc: 'LANG4'},
|
||||||
|
{id: 'LANG5', name: 'LANG5', desc: 'LANG5'},
|
||||||
|
{id: 'LANG6', name: 'LANG6', desc: 'LANG6'},
|
||||||
|
{id: 'LANG7', name: 'LANG7', desc: 'LANG7'},
|
||||||
|
{id: 'LANG8', name: 'LANG8', desc: 'LANG8'},
|
||||||
|
{id: 'LANG9', name: 'LANG9', desc: 'LANG9'},
|
||||||
|
{id: 'ALT_ERASE', name: 'ALT_ERASE', desc: 'ALT_ERASE'},
|
||||||
|
{id: 'SYSREQ', name: 'SYSREQ', desc: 'SYSREQ'},
|
||||||
|
{id: 'CANCEL', name: 'CANCEL', desc: 'CANCEL'},
|
||||||
|
{id: 'CLEAR', name: 'CLEAR', desc: 'CLEAR'},
|
||||||
|
{id: 'PRIOR', name: 'PRIOR', desc: 'PRIOR'},
|
||||||
|
{id: 'RETURN', name: 'RETURN', desc: 'RETURN'},
|
||||||
|
{id: 'SEPARATOR', name: 'SEPARATOR', desc: 'SEPARATOR'},
|
||||||
|
{id: 'OUT', name: 'OUT', desc: 'OUT'},
|
||||||
|
{id: 'OPER', name: 'OPER', desc: 'OPER'},
|
||||||
|
{id: 'CLEAR_AGAIN', name: 'CLEAR_AGAIN', desc: 'CLEAR_AGAIN'},
|
||||||
|
{id: 'CRSEL', name: 'CRSEL', desc: 'CRSEL'},
|
||||||
|
{id: 'EXSEL', name: 'EXSEL', desc: 'EXSEL'},
|
||||||
|
|
||||||
|
/* System & Media key 165-191(0xa5-bf) */
|
||||||
|
{id: 'PWR ', name: 'Sys Power', desc: 'System Power'},
|
||||||
|
{id: 'SLEP', name: 'Sys Sleep', desc: 'System Sleep'},
|
||||||
|
{id: 'WAKE', name: 'Sys Wake', desc: 'System Wake'},
|
||||||
|
{id: 'MUTE', name: 'Mute', desc: 'Audio Mute'},
|
||||||
|
{id: 'VOLU', name: 'Vol Up', desc: 'Audio Vol Up'},
|
||||||
|
{id: 'VOLD', name: 'Vol Down', desc: 'Audio Vol Down'},
|
||||||
|
{id: 'MNXT', name: 'Next Track', desc: 'Next Track'},
|
||||||
|
{id: 'MPRV', name: 'Prev Track', desc: 'Previous Track'},
|
||||||
|
{id: 'MSTP', name: 'Stop', desc: 'Media Stop'},
|
||||||
|
{id: 'MPLY', name: 'Play Pause', desc: 'Play Pause'},
|
||||||
|
{id: 'MSEL', name: 'Select', desc: 'Media Select'},
|
||||||
|
{id: 'EJCT', name: 'Eject', desc: 'Media Eject'},
|
||||||
|
{id: 'MAIL', name: 'Mail', desc: 'Mail'},
|
||||||
|
{id: 'CALC', name: 'Calc', desc: 'Calculator'},
|
||||||
|
{id: 'MYCM', name: 'My Computer', desc: 'My Computer'},
|
||||||
|
{id: 'WSCH', name: 'Web Search', desc: 'WWW Search'},
|
||||||
|
{id: 'WHOM', name: 'Web Home', desc: 'WWW Home'},
|
||||||
|
{id: 'WBAK', name: 'Web Back', desc: 'WWW Back'},
|
||||||
|
{id: 'WFWD', name: 'Web Forward', desc: 'WWW Forward'},
|
||||||
|
{id: 'WSTP', name: 'Web Stop', desc: 'WWW Stop'},
|
||||||
|
{id: 'WREF', name: 'Web Refresh', desc: 'WWW Refresh'},
|
||||||
|
{id: 'WFAV', name: 'Web Favorites', desc: 'WWW Favorites'},
|
||||||
|
{id: 'RESERVED-187', name: 'RESERVED-187', desc: 'RESERVED-187'},
|
||||||
|
{id: 'RESERVED-188', name: 'RESERVED-188', desc: 'RESERVED-188'},
|
||||||
|
{id: 'RESERVED-189', name: 'RESERVED-189', desc: 'RESERVED-189'},
|
||||||
|
{id: 'RESERVED-190', name: 'RESERVED-190', desc: 'RESERVED-190'},
|
||||||
|
{id: 'RESERVED-191', name: 'RESERVED-191', desc: 'RESERVED-191'},
|
||||||
|
|
||||||
|
/* Fn key 192-223(0xc0-df) */
|
||||||
|
{id: 'FN0 ', name: 'L1', desc: 'Change to Layer 1(Momentary) '},
|
||||||
|
{id: 'FN1 ', name: 'L2', desc: 'Change to Layer 2(Momentary) '},
|
||||||
|
{id: 'FN2 ', name: 'L3', desc: 'Change to Layer 3(Momentary) '},
|
||||||
|
{id: 'FN3 ', name: 'L4', desc: 'Change to Layer 4(Momentary) '},
|
||||||
|
{id: 'FN4 ', name: 'L5', desc: 'Change to Layer 5(Momentary) '},
|
||||||
|
{id: 'FN5 ', name: 'L6', desc: 'Change to Layer 6(Momentary) '},
|
||||||
|
{id: 'FN6 ', name: 'L7', desc: 'Change to Layer 7(Momentary) '},
|
||||||
|
{id: 'FN7 ', name: 'T1', desc: 'Change to Layer 1(Toggle) '},
|
||||||
|
{id: 'FN8 ', name: 'T2', desc: 'Change to Layer 2(Toggle) '},
|
||||||
|
{id: 'FN9 ', name: 'T3', desc: 'Change to Layer 3(Toggle) '},
|
||||||
|
{id: 'FN10', name: 'L1t', desc: 'Change to Layer 1(Momentary with Tap Toggle) '},
|
||||||
|
{id: 'FN11', name: 'L2t', desc: 'Change to Layer 2(Momentary with Tap Toggle) '},
|
||||||
|
{id: 'FN12', name: 'L3t', desc: 'Change to Layer 3(Momentary with Tap Toggle) '},
|
||||||
|
/* Layer swith with Tap key */
|
||||||
|
{id: 'FN13', name: 'A (L1)', desc: 'A with with L1(Tap key)'},
|
||||||
|
{id: 'FN14', name: 'F (L2)', desc: 'F with with L2(Tap key)'},
|
||||||
|
{id: 'FN15', name: 'J (L3)', desc: 'J with with L3(Tap key)'},
|
||||||
|
{id: 'FN16', name: 'Space (L4)', desc: 'Space with L4(Tap key)'},
|
||||||
|
{id: 'FN17', name: '; (L5)', desc: 'Semicolon with L5(Tap key)'},
|
||||||
|
{id: 'FN18', name: '\'( L6)', desc: 'Quote with L6(Tap key)'},
|
||||||
|
{id: 'FN19', name: '/ (L7)', desc: 'Slash with with L7(Tap key)'},
|
||||||
|
/* Modifier on alpha key(Tap key, Dual-role key) */
|
||||||
|
{id: 'FN20', name: 'Space (LShift)', desc: 'Space with Left Sfhit(Tap key)'},
|
||||||
|
{id: 'FN21', name: 'Space (LCtrl)', desc: 'Space with Left Control(Tap key)'},
|
||||||
|
{id: 'FN22', name: '\' (RCtrl)', desc: 'Quote with Right Control(Tap key)'},
|
||||||
|
{id: 'FN23', name: 'Enter (RCtrl)', desc: 'Enter with Right Control(Tap key)'},
|
||||||
|
/* Modifier with a key(Tap key, Dual-role key) */
|
||||||
|
{id: 'FN24', name: 'LCtrl (Esc)', desc: 'Left Control with Escape'},
|
||||||
|
{id: 'FN25', name: 'LCtrl (Backspace)', desc: 'Left Control with Backspace'},
|
||||||
|
{id: 'FN26', name: 'LCtrl (OneShot)', desc: 'Left Control(OneShot Modifier)'},
|
||||||
|
{id: 'FN27', name: 'LShift (Esc)', desc: 'Left Shift with Escape'},
|
||||||
|
{id: 'FN28', name: 'LShift (Backspace)', desc: 'Left Shift with Backspace'},
|
||||||
|
{id: 'FN29', name: 'LShift (OneShot)', desc: 'Left Shift(OneShot Modifier)'},
|
||||||
|
{id: 'FN30', name: 'RShift (`)', desc: 'Right Shift with Grave(Tap key)'},
|
||||||
|
{id: 'FN31', name: 'RShift (\\)', desc: 'Right Shift with Backslash(Tap key)'},
|
||||||
|
|
||||||
|
/* Standeard codes for 16bit Action 165-223(0xa5-df)
|
||||||
|
{id: 'RESERVED-165', name: 'RESERVED-165', desc: 'RESERVED-165'},
|
||||||
|
{id: 'RESERVED-166', name: 'RESERVED-166', desc: 'RESERVED-166'},
|
||||||
|
{id: 'RESERVED-167', name: 'RESERVED-167', desc: 'RESERVED-167'},
|
||||||
|
{id: 'RESERVED-168', name: 'RESERVED-168', desc: 'RESERVED-168'},
|
||||||
|
{id: 'RESERVED-169', name: 'RESERVED-169', desc: 'RESERVED-169'},
|
||||||
|
{id: 'RESERVED-170', name: 'RESERVED-170', desc: 'RESERVED-170'},
|
||||||
|
{id: 'RESERVED-171', name: 'RESERVED-171', desc: 'RESERVED-171'},
|
||||||
|
{id: 'RESERVED-172', name: 'RESERVED-172', desc: 'RESERVED-172'},
|
||||||
|
{id: 'RESERVED-173', name: 'RESERVED-173', desc: 'RESERVED-173'},
|
||||||
|
{id: 'RESERVED-174', name: 'RESERVED-174', desc: 'RESERVED-174'},
|
||||||
|
{id: 'RESERVED-175', name: 'RESERVED-175', desc: 'RESERVED-175'},
|
||||||
|
{id: 'KP_00', name: 'KP_00', desc: 'KP_00'},
|
||||||
|
{id: 'KP_000', name: 'KP_000', desc: 'KP_000'},
|
||||||
|
{id: 'THOUSANDS_SEPARATOR', name: 'THOUSANDS_SEPARATOR', desc: 'THOUSANDS_SEPARATOR'},
|
||||||
|
{id: 'DECIMAL_SEPARATOR', name: 'DECIMAL_SEPARATOR', desc: 'DECIMAL_SEPARATOR'},
|
||||||
|
{id: 'CURRENCY_UNIT', name: 'CURRENCY_UNIT', desc: 'CURRENCY_UNIT'},
|
||||||
|
{id: 'CURRENCY_SUB_UNIT', name: 'CURRENCY_SUB_UNIT', desc: 'CURRENCY_SUB_UNIT'},
|
||||||
|
{id: 'KP_LPAREN', name: 'KP_LPAREN', desc: 'KP_LPAREN'},
|
||||||
|
{id: 'KP_RPAREN', name: 'KP_RPAREN', desc: 'KP_RPAREN'},
|
||||||
|
{id: 'KP_LCBRACKET', name: 'KP_LCBRACKET', desc: 'KP_LCBRACKET'},
|
||||||
|
{id: 'KP_RCBRACKET', name: 'KP_RCBRACKET', desc: 'KP_RCBRACKET'},
|
||||||
|
{id: 'KP_TAB', name: 'KP_TAB', desc: 'KP_TAB'},
|
||||||
|
{id: 'KP_BSPACE', name: 'KP_BSPACE', desc: 'KP_BSPACE'},
|
||||||
|
{id: 'KP_A', name: 'KP_A', desc: 'KP_A'},
|
||||||
|
{id: 'KP_B', name: 'KP_B', desc: 'KP_B'},
|
||||||
|
{id: 'KP_C', name: 'KP_C', desc: 'KP_C'},
|
||||||
|
{id: 'KP_D', name: 'KP_D', desc: 'KP_D'},
|
||||||
|
{id: 'KP_E', name: 'KP_E', desc: 'KP_E'},
|
||||||
|
{id: 'KP_F', name: 'KP_F', desc: 'KP_F'},
|
||||||
|
{id: 'KP_XOR', name: 'KP_XOR', desc: 'KP_XOR'},
|
||||||
|
{id: 'KP_HAT', name: 'KP_HAT', desc: 'KP_HAT'},
|
||||||
|
{id: 'KP_PERC', name: 'KP_PERC', desc: 'KP_PERC'},
|
||||||
|
{id: 'KP_LT', name: 'KP_LT', desc: 'KP_LT'},
|
||||||
|
{id: 'KP_GT', name: 'KP_GT', desc: 'KP_GT'},
|
||||||
|
{id: 'KP_AND', name: 'KP_AND', desc: 'KP_AND'},
|
||||||
|
{id: 'KP_LAZYAND', name: 'KP_LAZYAND', desc: 'KP_LAZYAND'},
|
||||||
|
{id: 'KP_OR', name: 'KP_OR', desc: 'KP_OR'},
|
||||||
|
{id: 'KP_LAZYOR', name: 'KP_LAZYOR', desc: 'KP_LAZYOR'},
|
||||||
|
{id: 'KP_COLON', name: 'KP_COLON', desc: 'KP_COLON'},
|
||||||
|
{id: 'KP_HASH', name: 'KP_HASH', desc: 'KP_HASH'},
|
||||||
|
{id: 'KP_SPACE', name: 'KP_SPACE', desc: 'KP_SPACE'},
|
||||||
|
{id: 'KP_ATMARK', name: 'KP_ATMARK', desc: 'KP_ATMARK'},
|
||||||
|
{id: 'KP_EXCLAMATION', name: 'KP_EXCLAMATION', desc: 'KP_EXCLAMATION'},
|
||||||
|
{id: 'KP_MEM_STORE', name: 'KP_MEM_STORE', desc: 'KP_MEM_STORE'},
|
||||||
|
{id: 'KP_MEM_RECALL', name: 'KP_MEM_RECALL', desc: 'KP_MEM_RECALL'},
|
||||||
|
{id: 'KP_MEM_CLEAR', name: 'KP_MEM_CLEAR', desc: 'KP_MEM_CLEAR'},
|
||||||
|
{id: 'KP_MEM_ADD', name: 'KP_MEM_ADD', desc: 'KP_MEM_ADD'},
|
||||||
|
{id: 'KP_MEM_SUB', name: 'KP_MEM_SUB', desc: 'KP_MEM_SUB'},
|
||||||
|
{id: 'KP_MEM_MUL', name: 'KP_MEM_MUL', desc: 'KP_MEM_MUL'},
|
||||||
|
{id: 'KP_MEM_DIV', name: 'KP_MEM_DIV', desc: 'KP_MEM_DIV'},
|
||||||
|
{id: 'KP_PLUS_MINUS', name: 'KP_PLUS_MINUS', desc: 'KP_PLUS_MINUS'},
|
||||||
|
{id: 'KP_CLEAR', name: 'KP_CLEAR', desc: 'KP_CLEAR'},
|
||||||
|
{id: 'KP_CLEAR_ENTRY', name: 'KP_CLEAR_ENTRY', desc: 'KP_CLEAR_ENTRY'},
|
||||||
|
{id: 'KP_BINARY', name: 'KP_BINARY', desc: 'KP_BINARY'},
|
||||||
|
{id: 'KP_OCTAL', name: 'KP_OCTAL', desc: 'KP_OCTAL'},
|
||||||
|
{id: 'KP_DECIMAL', name: 'KP_DECIMAL', desc: 'KP_DECIMAL'},
|
||||||
|
{id: 'KP_HEXADECIMAL', name: 'KP_HEXADECIMAL', desc: 'KP_HEXADECIMAL'},
|
||||||
|
{id: 'RESERVED-222', name: 'RESERVED-222', desc: 'RESERVED-222'},
|
||||||
|
{id: 'RESERVED-223', name: 'RESERVED-223', desc: 'RESERVED-223'},
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Modifier 224-231(0xe0-e7) */
|
||||||
|
{id: 'LCTL', name: 'LCtrl', desc: 'Left Control'},
|
||||||
|
{id: 'LSFT', name: 'LShift', desc: 'Left Shift'},
|
||||||
|
{id: 'LALT', name: 'LAlt', desc: 'Left Alt(\u2325)'},
|
||||||
|
{id: 'LGUI', name: 'LGui', desc: 'Left Windows(\u2318)'},
|
||||||
|
{id: 'RCTL', name: 'RCtrl', desc: 'Right Control'},
|
||||||
|
{id: 'RSFT', name: 'RShift', desc: 'Right Shift'},
|
||||||
|
{id: 'RALT', name: 'RAlt', desc: 'Right Alt(\u2325)'},
|
||||||
|
{id: 'RGUI', name: 'RGui', desc: 'Right Windows(\u2318)'},
|
||||||
|
|
||||||
|
/* Not used 232-239(0xe8-ef) */
|
||||||
|
{id: 'RESERVED-232', name: 'RESERVED-232', desc: 'RESERVED-232'},
|
||||||
|
{id: 'RESERVED-233', name: 'RESERVED-233', desc: 'RESERVED-233'},
|
||||||
|
{id: 'RESERVED-234', name: 'RESERVED-234', desc: 'RESERVED-234'},
|
||||||
|
{id: 'RESERVED-235', name: 'RESERVED-235', desc: 'RESERVED-235'},
|
||||||
|
{id: 'RESERVED-236', name: 'RESERVED-236', desc: 'RESERVED-236'},
|
||||||
|
{id: 'RESERVED-237', name: 'RESERVED-237', desc: 'RESERVED-237'},
|
||||||
|
{id: 'RESERVED-238', name: 'RESERVED-238', desc: 'RESERVED-238'},
|
||||||
|
{id: 'RESERVED-239', name: 'RESERVED-239', desc: 'RESERVED-239'},
|
||||||
|
|
||||||
|
/* Mousekey 240-255(0xf0-ff) */
|
||||||
|
{id: 'MS_U', name: 'Mouse Up', desc: 'Mouse UP'},
|
||||||
|
{id: 'MS_D', name: 'Mouse down', desc: 'Mouse Down'},
|
||||||
|
{id: 'MS_L', name: 'Mouse left', desc: 'Mouse Left'},
|
||||||
|
{id: 'MS_R', name: 'Mouse right', desc: 'Mouse Right'},
|
||||||
|
{id: 'BTN1', name: 'Mouse Btn1', desc: 'Mouse Button1'},
|
||||||
|
{id: 'BTN2', name: 'Mouse Btn2', desc: 'Mouse Button2'},
|
||||||
|
{id: 'BTN3', name: 'Mouse Btn3', desc: 'Mouse Button3'},
|
||||||
|
{id: 'BTN4', name: 'Mouse Btn4', desc: 'Mouse Button4'},
|
||||||
|
{id: 'BTN5', name: 'Mouse Btn5', desc: 'Mouse Button5'},
|
||||||
|
{id: 'WH_U', name: 'Wheel Up', desc: 'Wheel Up'},
|
||||||
|
{id: 'WH_D', name: 'Wheel Down', desc: 'Wheel Down'},
|
||||||
|
{id: 'WH_L', name: 'Wheel Left', desc: 'Wheel Left'},
|
||||||
|
{id: 'WH_R', name: 'Wheel Right', desc: 'Wheel Right'},
|
||||||
|
{id: 'ACL0', name: 'Mouse Slow', desc: 'Mouse Slow'},
|
||||||
|
{id: 'ACL1', name: 'Mouse Medium', desc: 'Mouse Medium'},
|
||||||
|
{id: 'ACL2', name: 'Mouse Fast', desc: 'Mouse Fast'},
|
||||||
|
];
|
Loading…
Reference in New Issue
Block a user