bump version to 2.11.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
osx2win32.*
|
||||
osx2win32_name.*
|
||||
osx2xkb.*
|
||||
osx2xkb_name.*
|
||||
html2win32.*
|
||||
html2win32_name.*
|
||||
osx.*
|
||||
osx_name.*
|
||||
stdc
|
||||
stdc++
|
||||
node_modules/
|
||||
@@ -0,0 +1,118 @@
|
||||
TESTS := stdc stdc++ python2 python3 javascript
|
||||
|
||||
check: $(TESTS)
|
||||
@set -e; for fn in $(TESTS); do \
|
||||
./$$fn; \
|
||||
echo $$fn: OK; \
|
||||
done
|
||||
@echo Done.
|
||||
|
||||
GEN := ../tools/keymap-gen
|
||||
DATA := ../data/keymaps.csv
|
||||
SOURCES := $(GEN) $(DATA)
|
||||
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
stdc: stdc.c osx2win32.h osx2win32_name.h \
|
||||
osx2xkb.h osx2xkb_name.h \
|
||||
html2win32.h html2win32_name.h \
|
||||
osx.h osx_name.h
|
||||
$(CC) -Wall -o $@ $^
|
||||
osx2win32.h: $(SOURCES)
|
||||
$(GEN) --lang stdc code-map $(DATA) osx win32 > $@
|
||||
osx2win32_name.h: $(SOURCES)
|
||||
$(GEN) --lang stdc name-map $(DATA) osx win32 > $@
|
||||
osx2xkb.h: $(SOURCES)
|
||||
$(GEN) --lang stdc code-map $(DATA) osx xkb > $@
|
||||
osx2xkb_name.h: $(SOURCES)
|
||||
$(GEN) --lang stdc name-map $(DATA) osx xkb > $@
|
||||
html2win32.h: $(SOURCES)
|
||||
$(GEN) --lang stdc code-map $(DATA) html win32 > $@
|
||||
html2win32_name.h: $(SOURCES)
|
||||
$(GEN) --lang stdc name-map $(DATA) html win32 > $@
|
||||
osx.h: $(SOURCES)
|
||||
$(GEN) --lang stdc code-table $(DATA) osx > $@
|
||||
osx_name.h: $(SOURCES)
|
||||
$(GEN) --lang stdc name-table $(DATA) osx > $@
|
||||
|
||||
stdc++: stdc++.cc osx2win32.hh osx2win32_name.hh \
|
||||
osx2xkb.hh osx2xkb_name.hh \
|
||||
html2win32.hh html2win32_name.hh \
|
||||
osx.hh osx_name.hh
|
||||
$(CXX) -Wall -std=c++11 -o $@ $^
|
||||
osx2win32.hh: $(SOURCES)
|
||||
$(GEN) --lang stdc++ code-map $(DATA) osx win32 > $@
|
||||
osx2win32_name.hh: $(SOURCES)
|
||||
$(GEN) --lang stdc++ name-map $(DATA) osx win32 > $@
|
||||
osx2xkb.hh: $(SOURCES)
|
||||
$(GEN) --lang stdc++ code-map $(DATA) osx xkb > $@
|
||||
osx2xkb_name.hh: $(SOURCES)
|
||||
$(GEN) --lang stdc++ name-map $(DATA) osx xkb > $@
|
||||
html2win32.hh: $(SOURCES)
|
||||
$(GEN) --lang stdc++ code-map $(DATA) html win32 > $@
|
||||
html2win32_name.hh: $(SOURCES)
|
||||
$(GEN) --lang stdc++ name-map $(DATA) html win32 > $@
|
||||
osx.hh: $(SOURCES)
|
||||
$(GEN) --lang stdc++ code-table $(DATA) osx > $@
|
||||
osx_name.hh: $(SOURCES)
|
||||
$(GEN) --lang stdc++ name-table $(DATA) osx > $@
|
||||
|
||||
python2: osx2win32.py osx2win32_name.py \
|
||||
osx2xkb.py osx2xkb_name.py \
|
||||
html2win32.py html2win32_name.py \
|
||||
osx.py osx_name.py
|
||||
osx2win32.py: $(SOURCES)
|
||||
$(GEN) --lang python2 code-map $(DATA) osx win32 > $@
|
||||
osx2win32_name.py: $(SOURCES)
|
||||
$(GEN) --lang python2 name-map $(DATA) osx win32 > $@
|
||||
osx2xkb.py: $(SOURCES)
|
||||
$(GEN) --lang python2 code-map $(DATA) osx xkb > $@
|
||||
osx2xkb_name.py: $(SOURCES)
|
||||
$(GEN) --lang python2 name-map $(DATA) osx xkb > $@
|
||||
html2win32.py: $(SOURCES)
|
||||
$(GEN) --lang python2 code-map $(DATA) html win32 > $@
|
||||
html2win32_name.py: $(SOURCES)
|
||||
$(GEN) --lang python2 name-map $(DATA) html win32 > $@
|
||||
osx.py: $(SOURCES)
|
||||
$(GEN) --lang python2 code-table $(DATA) osx > $@
|
||||
osx_name.py: $(SOURCES)
|
||||
$(GEN) --lang python2 name-table $(DATA) osx > $@
|
||||
|
||||
javascript: node_modules/babel-core \
|
||||
node_modules/babel-plugin-transform-es2015-modules-commonjs \
|
||||
osx2win32.js osx2win32_name.js \
|
||||
osx2xkb.js osx2xkb_name.js \
|
||||
html2win32.js html2win32_name.js \
|
||||
osx.js osx_name.js
|
||||
node_modules/babel-core:
|
||||
npm install babel-core
|
||||
node_modules/babel-plugin-transform-es2015-modules-commonjs:
|
||||
npm install babel-plugin-transform-es2015-modules-commonjs
|
||||
osx2win32.js: $(SOURCES)
|
||||
$(GEN) --lang js code-map $(DATA) osx win32 > $@
|
||||
osx2win32_name.js: $(SOURCES)
|
||||
$(GEN) --lang js name-map $(DATA) osx win32 > $@
|
||||
osx2xkb.js: $(SOURCES)
|
||||
$(GEN) --lang js code-map $(DATA) osx xkb > $@
|
||||
osx2xkb_name.js: $(SOURCES)
|
||||
$(GEN) --lang js name-map $(DATA) osx xkb > $@
|
||||
html2win32.js: $(SOURCES)
|
||||
$(GEN) --lang js code-map $(DATA) html win32 > $@
|
||||
html2win32_name.js: $(SOURCES)
|
||||
$(GEN) --lang js name-map $(DATA) html win32 > $@
|
||||
osx.js: $(SOURCES)
|
||||
$(GEN) --lang js code-table $(DATA) osx > $@
|
||||
osx_name.js: $(SOURCES)
|
||||
$(GEN) --lang js name-table $(DATA) osx > $@
|
||||
|
||||
clean:
|
||||
rm -rf node_modules
|
||||
rm -f osx2win32.*
|
||||
rm -f osx2win32_name.*
|
||||
rm -f osx2xkb.*
|
||||
rm -f osx2xkb_name.*
|
||||
rm -f html2win32.*
|
||||
rm -f html2win32_name.*
|
||||
rm -f osx.*
|
||||
rm -f osx_name.*
|
||||
rm -f stdc stdc++
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env node
|
||||
/*
|
||||
* Keycode Map Generator JavaScript Tests
|
||||
*
|
||||
* Copyright 2017 Pierre Ossman for Cendio AB
|
||||
*
|
||||
* This file is dual license under the terms of the GPLv2 or later
|
||||
* and 3-clause BSD licenses.
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var assert = require('assert');
|
||||
var babel = require('babel-core');
|
||||
var fs = require('fs');
|
||||
|
||||
function include(fn) {
|
||||
var options = {
|
||||
plugins: ["transform-es2015-modules-commonjs"]
|
||||
};
|
||||
|
||||
var code = babel.transformFileSync(fn, options).code;
|
||||
fs.writeFileSync("." + fn + "_nodejs.js", code);
|
||||
var imp = require("./." + fn + "_nodejs.js");
|
||||
fs.unlinkSync("./." + fn + "_nodejs.js");
|
||||
|
||||
return imp
|
||||
}
|
||||
|
||||
var code_map_osx_to_win32 = include("osx2win32.js").default;
|
||||
var name_map_osx_to_win32 = include("osx2win32_name.js").default;
|
||||
|
||||
var code_map_osx_to_xkb = include("osx2xkb.js").default;
|
||||
var name_map_osx_to_xkb = include("osx2xkb_name.js").default;
|
||||
|
||||
var code_map_html_to_win32 = include("html2win32.js").default;
|
||||
var name_map_html_to_win32 = include("html2win32_name.js").default;
|
||||
|
||||
var code_table_osx = include("osx.js").default;
|
||||
var name_table_osx = include("osx_name.js").default;
|
||||
|
||||
assert.equal(code_map_osx_to_win32[0x1d], 0x30);
|
||||
assert.equal(name_map_osx_to_win32[0x1d], "VK_0");
|
||||
|
||||
assert.equal(code_map_osx_to_xkb[0x1d], "AE10");
|
||||
assert.equal(name_map_osx_to_xkb[0x1d], "AE10");
|
||||
|
||||
assert.equal(code_map_html_to_win32["ControlLeft"], 0x11);
|
||||
assert.equal(name_map_html_to_win32["ControlLeft"], "VK_CONTROL");
|
||||
|
||||
assert.equal(code_table_osx[0x1d], 0x3b);
|
||||
assert.equal(name_table_osx[0x1d], "Control");
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
python ./test.py
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
python3 ./test.py
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Keycode Map Generator C++ Tests
|
||||
*
|
||||
* Copyright 2017 Pierre Ossman for Cendio AB
|
||||
*
|
||||
* This file is dual license under the terms of the GPLv2 or later
|
||||
* and 3-clause BSD licenses.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "osx2win32.hh"
|
||||
#include "osx2win32_name.hh"
|
||||
|
||||
#include "osx2xkb.hh"
|
||||
#include "osx2xkb_name.hh"
|
||||
|
||||
#include "html2win32.hh"
|
||||
#include "html2win32_name.hh"
|
||||
|
||||
#include "osx.hh"
|
||||
#include "osx_name.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
assert(code_map_osx_to_win32[0x1d] == 0x30);
|
||||
assert(strcmp(name_map_osx_to_win32[0x1d], "VK_0") == 0);
|
||||
|
||||
assert(strcmp(code_map_osx_to_xkb[0x1d], "AE10") == 0);
|
||||
assert(strcmp(name_map_osx_to_xkb[0x1d], "AE10") == 0);
|
||||
|
||||
assert(code_map_html_to_win32.at("ControlLeft") == 0x11);
|
||||
assert(strcmp(name_map_html_to_win32.at("ControlLeft"), "VK_CONTROL") == 0);
|
||||
|
||||
assert(code_table_osx[0x1d] == 0x3b);
|
||||
assert(strcmp(name_table_osx[0x1d], "Control") == 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Keycode Map Generator C Tests
|
||||
*
|
||||
* Copyright 2017 Pierre Ossman for Cendio AB
|
||||
*
|
||||
* This file is dual license under the terms of the GPLv2 or later
|
||||
* and 3-clause BSD licenses.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "osx2win32.h"
|
||||
#include "osx2win32_name.h"
|
||||
|
||||
#include "osx2xkb.h"
|
||||
#include "osx2xkb_name.h"
|
||||
|
||||
#include "html2win32.h"
|
||||
#include "html2win32_name.h"
|
||||
|
||||
#include "osx.h"
|
||||
#include "osx_name.h"
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
assert(code_map_osx_to_win32_len == ARRAY_SIZE(code_map_osx_to_win32));
|
||||
assert(code_map_osx_to_win32[0x1d] == 0x30);
|
||||
assert(name_map_osx_to_win32_len == ARRAY_SIZE(name_map_osx_to_win32));
|
||||
assert(strcmp(name_map_osx_to_win32[0x1d], "VK_0") == 0);
|
||||
|
||||
assert(code_map_osx_to_xkb_len == ARRAY_SIZE(code_map_osx_to_xkb));
|
||||
assert(strcmp(code_map_osx_to_xkb[0x1d], "AE10") == 0);
|
||||
assert(name_map_osx_to_xkb_len == ARRAY_SIZE(name_map_osx_to_xkb));
|
||||
assert(strcmp(name_map_osx_to_xkb[0x1d], "AE10") == 0);
|
||||
|
||||
assert(code_map_html_to_win32_len == ARRAY_SIZE(code_map_html_to_win32));
|
||||
for (i = 0;i < code_map_html_to_win32_len;i++) {
|
||||
if (strcmp(code_map_html_to_win32[i].from, "ControlLeft") == 0) {
|
||||
assert(code_map_html_to_win32[i].to == 0x11);
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert(i != code_map_html_to_win32_len);
|
||||
assert(name_map_html_to_win32_len == ARRAY_SIZE(name_map_html_to_win32));
|
||||
for (i = 0;i < name_map_html_to_win32_len;i++) {
|
||||
if (strcmp(name_map_html_to_win32[i].from, "ControlLeft") == 0) {
|
||||
assert(strcmp(name_map_html_to_win32[i].to, "VK_CONTROL") == 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert(i != name_map_html_to_win32_len);
|
||||
|
||||
assert(code_table_osx_len == ARRAY_SIZE(code_table_osx));
|
||||
assert(code_table_osx[0x1d] == 0x3b);
|
||||
assert(name_table_osx_len == ARRAY_SIZE(name_table_osx));
|
||||
assert(strcmp(name_table_osx[0x1d], "Control") == 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
# Keycode Map Generator Python Tests
|
||||
#
|
||||
# Copyright 2017 Pierre Ossman for Cendio AB
|
||||
#
|
||||
# This file is dual license under the terms of the GPLv2 or later
|
||||
# and 3-clause BSD licenses.
|
||||
|
||||
import osx2win32
|
||||
import osx2win32_name
|
||||
|
||||
import osx2xkb
|
||||
import osx2xkb_name
|
||||
|
||||
import html2win32
|
||||
import html2win32_name
|
||||
|
||||
import osx
|
||||
import osx_name
|
||||
|
||||
assert osx2win32.code_map_osx_to_win32[0x1d] == 0x30
|
||||
assert osx2win32_name.name_map_osx_to_win32[0x1d] == "VK_0"
|
||||
|
||||
assert osx2xkb.code_map_osx_to_xkb[0x1d] == "AE10"
|
||||
assert osx2xkb_name.name_map_osx_to_xkb[0x1d] == "AE10"
|
||||
|
||||
assert html2win32.code_map_html_to_win32["ControlLeft"] == 0x11
|
||||
assert html2win32_name.name_map_html_to_win32["ControlLeft"] == "VK_CONTROL"
|
||||
|
||||
assert osx.code_table_osx[0x1d] == 0x3b;
|
||||
assert osx_name.name_table_osx[0x1d] == "Control";
|
||||
Reference in New Issue
Block a user