├── .gitignore ├── README.md ├── app.js ├── bin └── www ├── compiler ├── Makefile.ble60 ├── Makefile.kb60 ├── Makefile.kb68 ├── Makefile.kb72 └── Makefile.kb84 ├── package.json ├── public ├── Preloader.swf ├── WebEdit.swf ├── crossdomain.xml ├── firmware │ ├── 0B254DDAF5F73894FB0CCD89CEF1E5B1.bin │ ├── 0B254DDAF5F73894FB0CCD89CEF1E5B1.hex │ ├── 26CA02103A321B2EAF466BEE55AAB2F5.bin │ ├── 26CA02103A321B2EAF466BEE55AAB2F5.hex │ ├── 3C905AC6744CEF39F40460693C2D2B41.bin │ ├── 3C905AC6744CEF39F40460693C2D2B41.hex │ ├── 3FBAB957638B57B08DB6E985BCB4A659.bin │ ├── 3FBAB957638B57B08DB6E985BCB4A659.hex │ ├── 4674639F055F43E594ACDE7063E5F0C2.bin │ ├── 4674639F055F43E594ACDE7063E5F0C2.hex │ ├── 6DF3C523AE9B4E604B8B44F05C60867F.bin │ ├── 6DF3C523AE9B4E604B8B44F05C60867F.hex │ ├── 74334E7D720C67C03A9E06A87C67A1B8.bin │ ├── 74334E7D720C67C03A9E06A87C67A1B8.hex │ ├── 87F9BFB784BDD145A6BB8CC622367D0D.bin │ ├── 87F9BFB784BDD145A6BB8CC622367D0D.hex │ ├── D402EF6E5D86AAD4DCF0DF3777F58900.bin │ ├── D402EF6E5D86AAD4DCF0DF3777F58900.hex │ ├── DAEDF1034730C679E59641496DC79EBF.bin │ ├── DAEDF1034730C679E59641496DC79EBF.hex │ ├── DF9482E5F602508C283AEDA6058A64E1.bin │ ├── DF9482E5F602508C283AEDA6058A64E1.hex │ ├── E77636A940AD0F15C9238849212ECDC5.bin │ ├── E77636A940AD0F15C9238849212ECDC5.hex │ ├── FC88C6C26604001FC0056714582590FC.bin │ └── FC88C6C26604001FC0056714582590FC.hex ├── history │ ├── history.css │ ├── history.js │ └── historyFrame.html ├── images │ └── favicon.ico ├── javascripts │ ├── history.js │ ├── ie10-viewport-bug-workaround.js │ └── swfobject.js ├── playerProductInstall.swf └── stylesheets │ ├── blog.css │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ ├── bootstrap.min.css.map │ ├── history.css │ ├── sticky-footer.css │ └── style.css ├── routes └── index.js ├── test ├── cls1.js ├── epbt60 │ ├── config.json │ ├── create_keymap.js │ ├── fntype.json │ └── keycodeToKey.json ├── epbt75.json ├── initdb.js ├── initdb_diyso72.js ├── initdb_epbt68.js ├── initdb_epbt75.js ├── initdb_kc60.js ├── kc60 │ ├── config.json │ ├── create_keymap.js │ ├── fntype.json │ └── keycodeToKey.json ├── khash2.js ├── server_diyso60.js ├── server_epbt60.js ├── server_epbt60v2.js ├── server_kc60.js └── static.js └── views ├── diyso72.ejs ├── epbt75.ejs ├── error.ejs ├── index.ejs ├── index2.ejs ├── kb68.ejs └── keyboard.ejs /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | static_file/*.hex 4 | ./log 5 | compiler/tmk_keyboard 6 | .dep/ 7 | *.log 8 | *_temp/ 9 | keymap.db 10 | server.js 11 | *.db 12 | bootstrap-4.0.0-alpha 13 | *.zip 14 | controller 15 | bin/.dep/ 16 | bin/compiler 17 | bin/keymap 18 | bin/obj_*_temp 19 | .idea 20 | public/firmware 21 | keymap -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # online_compiler 2 | node js tmk compiler 3 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var favicon = require('serve-favicon'); 4 | var logger = require('morgan'); 5 | var cookieParser = require('cookie-parser'); 6 | var bodyParser = require('body-parser'); 7 | 8 | var routes = require('./routes/index'); 9 | var layout = require('./controller/layout'); 10 | var compile = require('./controller/compile'); 11 | 12 | var app = express(); 13 | 14 | // view engine setup 15 | app.set('views', path.join(__dirname, 'views')); 16 | app.set('view engine', 'ejs'); 17 | 18 | // uncomment after placing your favicon in /public 19 | //app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); 20 | app.use(logger('dev')); 21 | app.use(bodyParser.json()); 22 | app.use(bodyParser.urlencoded({ extended: false })); 23 | app.use(cookieParser()); 24 | app.use(express.static(path.join(__dirname, 'public'))); 25 | 26 | app.use('/', routes); 27 | app.use('/layout', layout); 28 | app.use('/compile', compile); 29 | 30 | // catch 404 and forward to error handler 31 | app.use(function(req, res, next) { 32 | var err = new Error('Not Found'); 33 | err.status = 404; 34 | next(err); 35 | }); 36 | 37 | // error handlers 38 | 39 | // development error handler 40 | // will print stacktrace 41 | if (app.get('env') === 'development') { 42 | app.use(function(err, req, res, next) { 43 | res.status(err.status || 500); 44 | res.render('error', { 45 | message: err.message, 46 | error: err 47 | }); 48 | }); 49 | } 50 | 51 | // production error handler 52 | // no stacktraces leaked to user 53 | app.use(function(err, req, res, next) { 54 | res.status(err.status || 500); 55 | res.render('error', { 56 | message: err.message, 57 | error: {} 58 | }); 59 | }); 60 | 61 | 62 | module.exports = app; 63 | -------------------------------------------------------------------------------- /bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('online_compiler:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3000'); 16 | app.set('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app); 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port); 29 | server.on('error', onError); 30 | server.on('listening', onListening); 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort(val) { 37 | var port = parseInt(val, 10); 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val; 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError(error) { 57 | if (error.syscall !== 'listen') { 58 | throw error; 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port; 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges'); 69 | process.exit(1); 70 | break; 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use'); 73 | process.exit(1); 74 | break; 75 | default: 76 | throw error; 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening() { 85 | var addr = server.address(); 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port; 89 | debug('Listening on ' + bind); 90 | } 91 | -------------------------------------------------------------------------------- /compiler/Makefile.ble60: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------------------- 2 | # On command line: 3 | # 4 | # make all = Make software. 5 | # 6 | # make clean = Clean out built project files. 7 | # 8 | # make coff = Convert ELF to AVR COFF. 9 | # 10 | # make extcoff = Convert ELF to AVR Extended COFF. 11 | # 12 | # make program = Download the hex file to the device. 13 | # Please customize your programmer settings(PROGRAM_CMD) 14 | # 15 | # make teensy = Download the hex file to the device, using teensy_loader_cli. 16 | # (must have teensy_loader_cli installed). 17 | # 18 | # make dfu = Download the hex file to the device, using dfu-programmer (must 19 | # have dfu-programmer installed). 20 | # 21 | # make flip = Download the hex file to the device, using Atmel FLIP (must 22 | # have Atmel FLIP installed). 23 | # 24 | # make dfu-ee = Download the eeprom file to the device, using dfu-programmer 25 | # (must have dfu-programmer installed). 26 | # 27 | # make flip-ee = Download the eeprom file to the device, using Atmel FLIP 28 | # (must have Atmel FLIP installed). 29 | # 30 | # make debug = Start either simulavr or avarice as specified for debugging, 31 | # with avr-gdb or avr-insight as the front end for debugging. 32 | # 33 | # make filename.s = Just compile filename.c into the assembler code only. 34 | # 35 | # make filename.i = Create a preprocessed source file for use in submitting 36 | # bug reports to the GCC project. 37 | # 38 | # To rebuild project do "make clean" then "make all". 39 | #---------------------------------------------------------------------------- 40 | 41 | # Target file name (without extension). 42 | TARGET = ble60_temp 43 | 44 | # Directory common source filess exist 45 | TMK_DIR = ../compiler/tmk_keyboard/tmk_core 46 | 47 | # Directory keyboard dependent files exist 48 | TARGET_DIR = ../compiler/tmk_keyboard 49 | 50 | # project specific files 51 | SRC = $(TARGET_DIR)/keyboard/ble60/keymap_common.c \ 52 | $(TARGET_DIR)/keyboard/ble60/matrix.c \ 53 | $(TARGET_DIR)/keyboard/ble60/led.c \ 54 | $(TARGET_DIR)/keyboard/ble60/backlight.c \ 55 | $(TARGET_DIR)/keyboard/ble60/lufa_ble.c 56 | 57 | ifdef KEYMAP 58 | SRC := $(KEYMAP) $(SRC) 59 | else 60 | SRC := $(TARGET_DIR)/keyboard/ble60/keymap_poker2.c $(SRC) 61 | endif 62 | 63 | ifdef CONF 64 | CONFIG_H = $(CONF) 65 | else 66 | CONFIG_H = $(TARGET_DIR)/keyboard/ble60/config.h 67 | endif 68 | 69 | ifdef HEXFILE 70 | HEXFILE = $(HEXFILE) 71 | else 72 | HEXFILE = ./gh60_lufa.hex 73 | endif 74 | 75 | ifdef BINFILE 76 | BINFILE = $(BINFILE) 77 | else 78 | BINFILE = ./gh60_lufa.bin 79 | endif 80 | 81 | # MCU name 82 | #MCU = at90usb1287 83 | MCU = atmega32u4 84 | 85 | # Processor frequency. 86 | # This will define a symbol, F_CPU, in all source code files equal to the 87 | # processor frequency in Hz. You can then use this symbol in your source code to 88 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done 89 | # automatically to create a 32-bit value in your source code. 90 | # 91 | # This will be an integer division of F_USB below, as it is sourced by 92 | # F_USB after it has run through any CPU prescalers. Note that this value 93 | # does not *change* the processor frequency - it should merely be updated to 94 | # reflect the processor speed set externally so that the code can use accurate 95 | # software delays. 96 | F_CPU = 16000000 97 | 98 | 99 | # 100 | # LUFA specific 101 | # 102 | # Target architecture (see library "Board Types" documentation). 103 | ARCH = AVR8 104 | 105 | # Input clock frequency. 106 | # This will define a symbol, F_USB, in all source code files equal to the 107 | # input clock frequency (before any prescaling is performed) in Hz. This value may 108 | # differ from F_CPU if prescaling is used on the latter, and is required as the 109 | # raw input clock is fed directly to the PLL sections of the AVR for high speed 110 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' 111 | # at the end, this will be done automatically to create a 32-bit value in your 112 | # source code. 113 | # 114 | # If no clock division is performed on the input clock inside the AVR (via the 115 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. 116 | F_USB = $(F_CPU) 117 | 118 | # Interrupt driven control endpoint task(+60) 119 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 120 | 121 | 122 | # Boot Section Size in *bytes* 123 | # Teensy halfKay 512 124 | # Teensy++ halfKay 1024 125 | # Atmel DFU loader 4096 126 | # LUFA bootloader 4096 127 | # USBaspLoader 2048 128 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 129 | 130 | 131 | # Build Options 132 | # comment out to disable the options. 133 | # 134 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) 135 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 136 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 137 | #CONSOLE_ENABLE = yes # Console for debug(+400) 138 | COMMAND_ENABLE = yes # Commands for debug and configuration 139 | #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend 140 | #NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA 141 | BACKLIGHT_ENABLE = yes 142 | 143 | # Optimize size but this may cause error "relocation truncated to fit" 144 | #EXTRALDFLAGS = -Wl,--relax 145 | 146 | # Search Path 147 | VPATH += $(TARGET_DIR) 148 | VPATH += $(TMK_DIR) 149 | 150 | include $(TMK_DIR)/protocol/lufa_ble.mk 151 | include $(TMK_DIR)/common.mk 152 | include $(TMK_DIR)/rules_online.mk 153 | -------------------------------------------------------------------------------- /compiler/Makefile.kb60: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------------------- 2 | # On command line: 3 | # 4 | # make all = Make software. 5 | # 6 | # make clean = Clean out built project files. 7 | # 8 | # make coff = Convert ELF to AVR COFF. 9 | # 10 | # make extcoff = Convert ELF to AVR Extended COFF. 11 | # 12 | # make program = Download the hex file to the device. 13 | # Please customize your programmer settings(PROGRAM_CMD) 14 | # 15 | # make teensy = Download the hex file to the device, using teensy_loader_cli. 16 | # (must have teensy_loader_cli installed). 17 | # 18 | # make dfu = Download the hex file to the device, using dfu-programmer (must 19 | # have dfu-programmer installed). 20 | # 21 | # make flip = Download the hex file to the device, using Atmel FLIP (must 22 | # have Atmel FLIP installed). 23 | # 24 | # make dfu-ee = Download the eeprom file to the device, using dfu-programmer 25 | # (must have dfu-programmer installed). 26 | # 27 | # make flip-ee = Download the eeprom file to the device, using Atmel FLIP 28 | # (must have Atmel FLIP installed). 29 | # 30 | # make debug = Start either simulavr or avarice as specified for debugging, 31 | # with avr-gdb or avr-insight as the front end for debugging. 32 | # 33 | # make filename.s = Just compile filename.c into the assembler code only. 34 | # 35 | # make filename.i = Create a preprocessed source file for use in submitting 36 | # bug reports to the GCC project. 37 | # 38 | # To rebuild project do "make clean" then "make all". 39 | #---------------------------------------------------------------------------- 40 | 41 | # Target file name (without extension). 42 | TARGET = kb60_temp 43 | 44 | # Directory common source filess exist 45 | TMK_DIR = ../compiler/tmk_keyboard/tmk_core 46 | 47 | # Directory keyboard dependent files exist 48 | TARGET_DIR = ../compiler/tmk_keyboard 49 | 50 | # project specific files 51 | SRC = $(TARGET_DIR)/keyboard/kb60/keymap_common.c \ 52 | $(TARGET_DIR)/keyboard/kb60/matrix.c \ 53 | $(TARGET_DIR)/keyboard/kb60/led.c \ 54 | $(TARGET_DIR)/keyboard/kb60/backlight.c 55 | 56 | ifdef KEYMAP 57 | SRC := $(KEYMAP) $(SRC) 58 | else 59 | SRC := $(TARGET_DIR)/keyboard/kb60/keymap_poker2.c $(SRC) 60 | endif 61 | 62 | ifdef CONF 63 | CONFIG_H = $(CONF) 64 | else 65 | CONFIG_H = $(TARGET_DIR)/keyboard/kb60/config.h 66 | endif 67 | 68 | ifdef HEXFILE 69 | HEXFILE = $(HEXFILE) 70 | else 71 | HEXFILE = ./gh60_lufa.hex 72 | endif 73 | 74 | ifdef BINFILE 75 | BINFILE = $(BINFILE) 76 | else 77 | BINFILE = ./gh60_lufa.bin 78 | endif 79 | 80 | # MCU name 81 | #MCU = at90usb1287 82 | MCU = atmega32u4 83 | 84 | # Processor frequency. 85 | # This will define a symbol, F_CPU, in all source code files equal to the 86 | # processor frequency in Hz. You can then use this symbol in your source code to 87 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done 88 | # automatically to create a 32-bit value in your source code. 89 | # 90 | # This will be an integer division of F_USB below, as it is sourced by 91 | # F_USB after it has run through any CPU prescalers. Note that this value 92 | # does not *change* the processor frequency - it should merely be updated to 93 | # reflect the processor speed set externally so that the code can use accurate 94 | # software delays. 95 | F_CPU = 16000000 96 | 97 | 98 | # 99 | # LUFA specific 100 | # 101 | # Target architecture (see library "Board Types" documentation). 102 | ARCH = AVR8 103 | 104 | # Input clock frequency. 105 | # This will define a symbol, F_USB, in all source code files equal to the 106 | # input clock frequency (before any prescaling is performed) in Hz. This value may 107 | # differ from F_CPU if prescaling is used on the latter, and is required as the 108 | # raw input clock is fed directly to the PLL sections of the AVR for high speed 109 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' 110 | # at the end, this will be done automatically to create a 32-bit value in your 111 | # source code. 112 | # 113 | # If no clock division is performed on the input clock inside the AVR (via the 114 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. 115 | F_USB = $(F_CPU) 116 | 117 | # Interrupt driven control endpoint task(+60) 118 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 119 | 120 | 121 | # Boot Section Size in *bytes* 122 | # Teensy halfKay 512 123 | # Teensy++ halfKay 1024 124 | # Atmel DFU loader 4096 125 | # LUFA bootloader 4096 126 | # USBaspLoader 2048 127 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 128 | 129 | 130 | # Build Options 131 | # comment out to disable the options. 132 | # 133 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) 134 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 135 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 136 | #CONSOLE_ENABLE = yes # Console for debug(+400) 137 | COMMAND_ENABLE = yes # Commands for debug and configuration 138 | #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend 139 | NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA 140 | BACKLIGHT_ENABLE = yes 141 | 142 | # Optimize size but this may cause error "relocation truncated to fit" 143 | #EXTRALDFLAGS = -Wl,--relax 144 | 145 | # Search Path 146 | VPATH += $(TARGET_DIR) 147 | VPATH += $(TMK_DIR) 148 | 149 | include $(TMK_DIR)/protocol/lufa.mk 150 | include $(TMK_DIR)/common.mk 151 | include $(TMK_DIR)/rules_online.mk 152 | -------------------------------------------------------------------------------- /compiler/Makefile.kb68: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------------------- 2 | # On command line: 3 | # 4 | # make all = Make software. 5 | # 6 | # make clean = Clean out built project files. 7 | # 8 | # make coff = Convert ELF to AVR COFF. 9 | # 10 | # make extcoff = Convert ELF to AVR Extended COFF. 11 | # 12 | # make program = Download the hex file to the device. 13 | # Please customize your programmer settings(PROGRAM_CMD) 14 | # 15 | # make teensy = Download the hex file to the device, using teensy_loader_cli. 16 | # (must have teensy_loader_cli installed). 17 | # 18 | # make dfu = Download the hex file to the device, using dfu-programmer (must 19 | # have dfu-programmer installed). 20 | # 21 | # make flip = Download the hex file to the device, using Atmel FLIP (must 22 | # have Atmel FLIP installed). 23 | # 24 | # make dfu-ee = Download the eeprom file to the device, using dfu-programmer 25 | # (must have dfu-programmer installed). 26 | # 27 | # make flip-ee = Download the eeprom file to the device, using Atmel FLIP 28 | # (must have Atmel FLIP installed). 29 | # 30 | # make debug = Start either simulavr or avarice as specified for debugging, 31 | # with avr-gdb or avr-insight as the front end for debugging. 32 | # 33 | # make filename.s = Just compile filename.c into the assembler code only. 34 | # 35 | # make filename.i = Create a preprocessed source file for use in submitting 36 | # bug reports to the GCC project. 37 | # 38 | # To rebuild project do "make clean" then "make all". 39 | #---------------------------------------------------------------------------- 40 | # Target file name (without extension). 41 | TARGET = kb68_temp 42 | 43 | # Directory common source filess exist 44 | TMK_DIR = ../compiler/tmk_keyboard/tmk_core 45 | 46 | # Directory keyboard dependent files exist 47 | TARGET_DIR = ../compiler/tmk_keyboard 48 | 49 | # project specific files 50 | SRC = $(TARGET_DIR)/keyboard/kb68/keymap_common.c \ 51 | $(TARGET_DIR)/keyboard/kb68/matrix.c \ 52 | $(TARGET_DIR)/keyboard/kb68/led.c \ 53 | $(TARGET_DIR)/keyboard/kb68/backlight.c 54 | 55 | ifdef KEYMAP 56 | SRC := $(KEYMAP) $(SRC) 57 | else 58 | SRC := $(TARGET_DIR)/keyboard/kb68/keymap_default.c $(SRC) 59 | endif 60 | 61 | ifdef CONF 62 | CONFIG_H = $(CONF) 63 | else 64 | CONFIG_H = $(TARGET_DIR)/keyboard/kb68/config.h 65 | endif 66 | 67 | ifdef HEXFILE 68 | HEXFILE = $(HEXFILE) 69 | else 70 | HEXFILE = ./kb68_lufa.hex 71 | endif 72 | 73 | ifdef BINFILE 74 | BINFILE = $(BINFILE) 75 | else 76 | BINFILE = ./kb68_lufa.bin 77 | endif 78 | 79 | # MCU name 80 | #MCU = at90usb1287 81 | MCU = atmega32u4 82 | 83 | # Processor frequency. 84 | # This will define a symbol, F_CPU, in all source code files equal to the 85 | # processor frequency in Hz. You can then use this symbol in your source code to 86 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done 87 | # automatically to create a 32-bit value in your source code. 88 | # 89 | # This will be an integer division of F_USB below, as it is sourced by 90 | # F_USB after it has run through any CPU prescalers. Note that this value 91 | # does not *change* the processor frequency - it should merely be updated to 92 | # reflect the processor speed set externally so that the code can use accurate 93 | # software delays. 94 | F_CPU = 16000000 95 | 96 | 97 | # 98 | # LUFA specific 99 | # 100 | # Target architecture (see library "Board Types" documentation). 101 | ARCH = AVR8 102 | 103 | # Input clock frequency. 104 | # This will define a symbol, F_USB, in all source code files equal to the 105 | # input clock frequency (before any prescaling is performed) in Hz. This value may 106 | # differ from F_CPU if prescaling is used on the latter, and is required as the 107 | # raw input clock is fed directly to the PLL sections of the AVR for high speed 108 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' 109 | # at the end, this will be done automatically to create a 32-bit value in your 110 | # source code. 111 | # 112 | # If no clock division is performed on the input clock inside the AVR (via the 113 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. 114 | F_USB = $(F_CPU) 115 | 116 | # Interrupt driven control endpoint task(+60) 117 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 118 | 119 | 120 | # Boot Section Size in *bytes* 121 | # Teensy halfKay 512 122 | # Teensy++ halfKay 1024 123 | # Atmel DFU loader 4096 124 | # LUFA bootloader 4096 125 | # USBaspLoader 2048 126 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 127 | 128 | 129 | # Build Options 130 | # comment out to disable the options. 131 | # 132 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) 133 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 134 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 135 | #CONSOLE_ENABLE = yes # Console for debug(+400) 136 | COMMAND_ENABLE = yes # Commands for debug and configuration 137 | #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend 138 | NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA 139 | BACKLIGHT_ENABLE = yes 140 | 141 | # Optimize size but this may cause error "relocation truncated to fit" 142 | #EXTRALDFLAGS = -Wl,--relax 143 | 144 | # Search Path 145 | VPATH += $(TARGET_DIR) 146 | VPATH += $(TMK_DIR) 147 | 148 | include $(TMK_DIR)/protocol/lufa.mk 149 | include $(TMK_DIR)/common.mk 150 | include $(TMK_DIR)/rules_online.mk 151 | -------------------------------------------------------------------------------- /compiler/Makefile.kb72: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------------------- 2 | # On command line: 3 | # 4 | # make all = Make software. 5 | # 6 | # make clean = Clean out built project files. 7 | # 8 | # make coff = Convert ELF to AVR COFF. 9 | # 10 | # make extcoff = Convert ELF to AVR Extended COFF. 11 | # 12 | # make program = Download the hex file to the device. 13 | # Please customize your programmer settings(PROGRAM_CMD) 14 | # 15 | # make teensy = Download the hex file to the device, using teensy_loader_cli. 16 | # (must have teensy_loader_cli installed). 17 | # 18 | # make dfu = Download the hex file to the device, using dfu-programmer (must 19 | # have dfu-programmer installed). 20 | # 21 | # make flip = Download the hex file to the device, using Atmel FLIP (must 22 | # have Atmel FLIP installed). 23 | # 24 | # make dfu-ee = Download the eeprom file to the device, using dfu-programmer 25 | # (must have dfu-programmer installed). 26 | # 27 | # make flip-ee = Download the eeprom file to the device, using Atmel FLIP 28 | # (must have Atmel FLIP installed). 29 | # 30 | # make debug = Start either simulavr or avarice as specified for debugging, 31 | # with avr-gdb or avr-insight as the front end for debugging. 32 | # 33 | # make filename.s = Just compile filename.c into the assembler code only. 34 | # 35 | # make filename.i = Create a preprocessed source file for use in submitting 36 | # bug reports to the GCC project. 37 | # 38 | # To rebuild project do "make clean" then "make all". 39 | #---------------------------------------------------------------------------- 40 | # Target file name (without extension). 41 | TARGET = kb72_temp 42 | 43 | # Directory common source filess exist 44 | TMK_DIR = ../compiler/tmk_keyboard/tmk_core 45 | 46 | # Directory keyboard dependent files exist 47 | TARGET_DIR = ../compiler/tmk_keyboard 48 | 49 | # project specific files 50 | SRC = $(TARGET_DIR)/keyboard/kb84/keymap_common.c \ 51 | $(TARGET_DIR)/keyboard/kb84/matrix.c \ 52 | $(TARGET_DIR)/keyboard/kb84/led.c \ 53 | $(TARGET_DIR)/keyboard/kb84/backlight.c 54 | 55 | ifdef KEYMAP 56 | SRC := $(KEYMAP) $(SRC) 57 | else 58 | SRC := $(TARGET_DIR)/keyboard/kb84/keymap_default.c $(SRC) 59 | endif 60 | 61 | ifdef CONF 62 | CONFIG_H = $(CONF) 63 | else 64 | CONFIG_H = $(TARGET_DIR)/keyboard/kb72/config.h 65 | endif 66 | 67 | ifdef HEXFILE 68 | HEXFILE = $(HEXFILE) 69 | else 70 | HEXFILE = ./kb72_lufa.hex 71 | endif 72 | 73 | ifdef BINFILE 74 | BINFILE = $(BINFILE) 75 | else 76 | BINFILE = ./kb72_lufa.bin 77 | endif 78 | 79 | # MCU name 80 | #MCU = at90usb1287 81 | MCU = atmega32u4 82 | 83 | # Processor frequency. 84 | # This will define a symbol, F_CPU, in all source code files equal to the 85 | # processor frequency in Hz. You can then use this symbol in your source code to 86 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done 87 | # automatically to create a 32-bit value in your source code. 88 | # 89 | # This will be an integer division of F_USB below, as it is sourced by 90 | # F_USB after it has run through any CPU prescalers. Note that this value 91 | # does not *change* the processor frequency - it should merely be updated to 92 | # reflect the processor speed set externally so that the code can use accurate 93 | # software delays. 94 | F_CPU = 16000000 95 | 96 | 97 | # 98 | # LUFA specific 99 | # 100 | # Target architecture (see library "Board Types" documentation). 101 | ARCH = AVR8 102 | 103 | # Input clock frequency. 104 | # This will define a symbol, F_USB, in all source code files equal to the 105 | # input clock frequency (before any prescaling is performed) in Hz. This value may 106 | # differ from F_CPU if prescaling is used on the latter, and is required as the 107 | # raw input clock is fed directly to the PLL sections of the AVR for high speed 108 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' 109 | # at the end, this will be done automatically to create a 32-bit value in your 110 | # source code. 111 | # 112 | # If no clock division is performed on the input clock inside the AVR (via the 113 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. 114 | F_USB = $(F_CPU) 115 | 116 | # Interrupt driven control endpoint task(+60) 117 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 118 | 119 | 120 | # Boot Section Size in *bytes* 121 | # Teensy halfKay 512 122 | # Teensy++ halfKay 1024 123 | # Atmel DFU loader 4096 124 | # LUFA bootloader 4096 125 | # USBaspLoader 2048 126 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 127 | 128 | 129 | # Build Options 130 | # comment out to disable the options. 131 | # 132 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) 133 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 134 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 135 | #CONSOLE_ENABLE = yes # Console for debug(+400) 136 | COMMAND_ENABLE = yes # Commands for debug and configuration 137 | #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend 138 | NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA 139 | BACKLIGHT_ENABLE = yes 140 | 141 | # Optimize size but this may cause error "relocation truncated to fit" 142 | #EXTRALDFLAGS = -Wl,--relax 143 | 144 | # Search Path 145 | VPATH += $(TARGET_DIR) 146 | VPATH += $(TMK_DIR) 147 | 148 | include $(TMK_DIR)/protocol/lufa.mk 149 | include $(TMK_DIR)/common.mk 150 | include $(TMK_DIR)/rules_online.mk 151 | -------------------------------------------------------------------------------- /compiler/Makefile.kb84: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------------------- 2 | # On command line: 3 | # 4 | # make all = Make software. 5 | # 6 | # make clean = Clean out built project files. 7 | # 8 | # make coff = Convert ELF to AVR COFF. 9 | # 10 | # make extcoff = Convert ELF to AVR Extended COFF. 11 | # 12 | # make program = Download the hex file to the device. 13 | # Please customize your programmer settings(PROGRAM_CMD) 14 | # 15 | # make teensy = Download the hex file to the device, using teensy_loader_cli. 16 | # (must have teensy_loader_cli installed). 17 | # 18 | # make dfu = Download the hex file to the device, using dfu-programmer (must 19 | # have dfu-programmer installed). 20 | # 21 | # make flip = Download the hex file to the device, using Atmel FLIP (must 22 | # have Atmel FLIP installed). 23 | # 24 | # make dfu-ee = Download the eeprom file to the device, using dfu-programmer 25 | # (must have dfu-programmer installed). 26 | # 27 | # make flip-ee = Download the eeprom file to the device, using Atmel FLIP 28 | # (must have Atmel FLIP installed). 29 | # 30 | # make debug = Start either simulavr or avarice as specified for debugging, 31 | # with avr-gdb or avr-insight as the front end for debugging. 32 | # 33 | # make filename.s = Just compile filename.c into the assembler code only. 34 | # 35 | # make filename.i = Create a preprocessed source file for use in submitting 36 | # bug reports to the GCC project. 37 | # 38 | # To rebuild project do "make clean" then "make all". 39 | #---------------------------------------------------------------------------- 40 | # Target file name (without extension). 41 | TARGET = kb84_temp 42 | 43 | # Directory common source filess exist 44 | TMK_DIR = ../compiler/tmk_keyboard/tmk_core 45 | 46 | # Directory keyboard dependent files exist 47 | TARGET_DIR = ../compiler/tmk_keyboard 48 | 49 | # project specific files 50 | SRC = $(TARGET_DIR)/keyboard/kb84/keymap_common.c \ 51 | $(TARGET_DIR)/keyboard/kb84/matrix.c \ 52 | $(TARGET_DIR)/keyboard/kb84/led.c \ 53 | $(TARGET_DIR)/keyboard/kb84/backlight.c 54 | 55 | ifdef KEYMAP 56 | SRC := $(KEYMAP) $(SRC) 57 | else 58 | SRC := $(TARGET_DIR)/keyboard/kb84/keymap_default.c $(SRC) 59 | endif 60 | 61 | ifdef CONF 62 | CONFIG_H = $(CONF) 63 | else 64 | CONFIG_H = $(TARGET_DIR)/keyboard/kb84/config.h 65 | endif 66 | 67 | ifdef HEXFILE 68 | HEXFILE = $(HEXFILE) 69 | else 70 | HEXFILE = ./kb84_lufa.hex 71 | endif 72 | 73 | ifdef BINFILE 74 | BINFILE = $(BINFILE) 75 | else 76 | BINFILE = ./kb84_lufa.bin 77 | endif 78 | 79 | # MCU name 80 | #MCU = at90usb1287 81 | MCU = atmega32u4 82 | 83 | # Processor frequency. 84 | # This will define a symbol, F_CPU, in all source code files equal to the 85 | # processor frequency in Hz. You can then use this symbol in your source code to 86 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done 87 | # automatically to create a 32-bit value in your source code. 88 | # 89 | # This will be an integer division of F_USB below, as it is sourced by 90 | # F_USB after it has run through any CPU prescalers. Note that this value 91 | # does not *change* the processor frequency - it should merely be updated to 92 | # reflect the processor speed set externally so that the code can use accurate 93 | # software delays. 94 | F_CPU = 16000000 95 | 96 | 97 | # 98 | # LUFA specific 99 | # 100 | # Target architecture (see library "Board Types" documentation). 101 | ARCH = AVR8 102 | 103 | # Input clock frequency. 104 | # This will define a symbol, F_USB, in all source code files equal to the 105 | # input clock frequency (before any prescaling is performed) in Hz. This value may 106 | # differ from F_CPU if prescaling is used on the latter, and is required as the 107 | # raw input clock is fed directly to the PLL sections of the AVR for high speed 108 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' 109 | # at the end, this will be done automatically to create a 32-bit value in your 110 | # source code. 111 | # 112 | # If no clock division is performed on the input clock inside the AVR (via the 113 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. 114 | F_USB = $(F_CPU) 115 | 116 | # Interrupt driven control endpoint task(+60) 117 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 118 | 119 | 120 | # Boot Section Size in *bytes* 121 | # Teensy halfKay 512 122 | # Teensy++ halfKay 1024 123 | # Atmel DFU loader 4096 124 | # LUFA bootloader 4096 125 | # USBaspLoader 2048 126 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 127 | 128 | 129 | # Build Options 130 | # comment out to disable the options. 131 | # 132 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) 133 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 134 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 135 | #CONSOLE_ENABLE = yes # Console for debug(+400) 136 | COMMAND_ENABLE = yes # Commands for debug and configuration 137 | #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend 138 | NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA 139 | BACKLIGHT_ENABLE = yes 140 | 141 | # Optimize size but this may cause error "relocation truncated to fit" 142 | #EXTRALDFLAGS = -Wl,--relax 143 | 144 | # Search Path 145 | VPATH += $(TARGET_DIR) 146 | VPATH += $(TMK_DIR) 147 | 148 | include $(TMK_DIR)/protocol/lufa.mk 149 | include $(TMK_DIR)/common.mk 150 | include $(TMK_DIR)/rules_online.mk 151 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "online_compiler", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "body-parser": "~1.13.2", 10 | "cookie-parser": "~1.3.5", 11 | "debug": "~2.2.0", 12 | "ejs": "~2.3.3", 13 | "express": "~4.13.1", 14 | "morgan": "~1.6.1", 15 | "serve-favicon": "~2.3.0", 16 | "sqlite3" : "~3.1.1" 17 | } 18 | } -------------------------------------------------------------------------------- /public/Preloader.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/Preloader.swf -------------------------------------------------------------------------------- /public/WebEdit.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/WebEdit.swf -------------------------------------------------------------------------------- /public/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/firmware/0B254DDAF5F73894FB0CCD89CEF1E5B1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/0B254DDAF5F73894FB0CCD89CEF1E5B1.bin -------------------------------------------------------------------------------- /public/firmware/26CA02103A321B2EAF466BEE55AAB2F5.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/26CA02103A321B2EAF466BEE55AAB2F5.bin -------------------------------------------------------------------------------- /public/firmware/3C905AC6744CEF39F40460693C2D2B41.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/3C905AC6744CEF39F40460693C2D2B41.bin -------------------------------------------------------------------------------- /public/firmware/3FBAB957638B57B08DB6E985BCB4A659.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/3FBAB957638B57B08DB6E985BCB4A659.bin -------------------------------------------------------------------------------- /public/firmware/4674639F055F43E594ACDE7063E5F0C2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/4674639F055F43E594ACDE7063E5F0C2.bin -------------------------------------------------------------------------------- /public/firmware/6DF3C523AE9B4E604B8B44F05C60867F.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/6DF3C523AE9B4E604B8B44F05C60867F.bin -------------------------------------------------------------------------------- /public/firmware/74334E7D720C67C03A9E06A87C67A1B8.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/74334E7D720C67C03A9E06A87C67A1B8.bin -------------------------------------------------------------------------------- /public/firmware/87F9BFB784BDD145A6BB8CC622367D0D.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/87F9BFB784BDD145A6BB8CC622367D0D.bin -------------------------------------------------------------------------------- /public/firmware/D402EF6E5D86AAD4DCF0DF3777F58900.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/D402EF6E5D86AAD4DCF0DF3777F58900.bin -------------------------------------------------------------------------------- /public/firmware/DAEDF1034730C679E59641496DC79EBF.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/DAEDF1034730C679E59641496DC79EBF.bin -------------------------------------------------------------------------------- /public/firmware/DF9482E5F602508C283AEDA6058A64E1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/DF9482E5F602508C283AEDA6058A64E1.bin -------------------------------------------------------------------------------- /public/firmware/E77636A940AD0F15C9238849212ECDC5.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/E77636A940AD0F15C9238849212ECDC5.bin -------------------------------------------------------------------------------- /public/firmware/FC88C6C26604001FC0056714582590FC.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/firmware/FC88C6C26604001FC0056714582590FC.bin -------------------------------------------------------------------------------- /public/history/history.css: -------------------------------------------------------------------------------- 1 | /* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */ 2 | 3 | #ie_historyFrame { width: 0px; height: 0px; display:none } 4 | #firefox_anchorDiv { width: 0px; height: 0px; display:none } 5 | #safari_formDiv { width: 0px; height: 0px; display:none } 6 | #safari_rememberDiv { width: 0px; height: 0px; display:none } 7 | -------------------------------------------------------------------------------- /public/history/history.js: -------------------------------------------------------------------------------- 1 | BrowserHistoryUtils = { 2 | addEvent: function(elm, evType, fn, useCapture) { 3 | useCapture = useCapture || false; 4 | if (elm.addEventListener) { 5 | elm.addEventListener(evType, fn, useCapture); 6 | return true; 7 | } 8 | else if (elm.attachEvent) { 9 | var r = elm.attachEvent('on' + evType, fn); 10 | return r; 11 | } 12 | else { 13 | elm['on' + evType] = fn; 14 | } 15 | } 16 | } 17 | 18 | BrowserHistory = (function() { 19 | // type of browser 20 | var browser = { 21 | ie: false, 22 | ie8: false, 23 | firefox: false, 24 | safari: false, 25 | opera: false, 26 | version: -1 27 | }; 28 | 29 | // Default app state URL to use when no fragment ID present 30 | var defaultHash = ''; 31 | 32 | // Last-known app state URL 33 | var currentHref = document.location.href; 34 | 35 | // Initial URL (used only by IE) 36 | var initialHref = document.location.href; 37 | 38 | // Initial URL (used only by IE) 39 | var initialHash = document.location.hash; 40 | 41 | // History frame source URL prefix (used only by IE) 42 | var historyFrameSourcePrefix = 'history/historyFrame.html?'; 43 | 44 | // History maintenance (used only by Safari) 45 | var currentHistoryLength = -1; 46 | 47 | // Flag to denote the existence of onhashchange 48 | var browserHasHashChange = false; 49 | 50 | var historyHash = []; 51 | 52 | var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash); 53 | 54 | var backStack = []; 55 | var forwardStack = []; 56 | 57 | var currentObjectId = null; 58 | 59 | //UserAgent detection 60 | var useragent = navigator.userAgent.toLowerCase(); 61 | 62 | if (useragent.indexOf("opera") != -1) { 63 | browser.opera = true; 64 | } else if (useragent.indexOf("msie") != -1) { 65 | browser.ie = true; 66 | browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4)); 67 | if (browser.version == 8) 68 | { 69 | browser.ie = false; 70 | browser.ie8 = true; 71 | } 72 | } else if (useragent.indexOf("safari") != -1) { 73 | browser.safari = true; 74 | browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7)); 75 | } else if (useragent.indexOf("gecko") != -1) { 76 | browser.firefox = true; 77 | } 78 | 79 | if (browser.ie == true && browser.version == 7) { 80 | window["_ie_firstload"] = false; 81 | } 82 | 83 | function hashChangeHandler() 84 | { 85 | currentHref = document.location.href; 86 | var flexAppUrl = getHash(); 87 | //ADR: to fix multiple 88 | if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { 89 | var pl = getPlayers(); 90 | for (var i = 0; i < pl.length; i++) { 91 | pl[i].browserURLChange(flexAppUrl); 92 | } 93 | } else { 94 | getPlayer().browserURLChange(flexAppUrl); 95 | } 96 | } 97 | 98 | // Accessor functions for obtaining specific elements of the page. 99 | function getHistoryFrame() 100 | { 101 | return document.getElementById('ie_historyFrame'); 102 | } 103 | 104 | function getFormElement() 105 | { 106 | return document.getElementById('safari_formDiv'); 107 | } 108 | 109 | function getRememberElement() 110 | { 111 | return document.getElementById("safari_remember_field"); 112 | } 113 | 114 | // Get the Flash player object for performing ExternalInterface callbacks. 115 | // Updated for changes to SWFObject2. 116 | function getPlayer(id) { 117 | var i; 118 | 119 | if (id && document.getElementById(id)) { 120 | var r = document.getElementById(id); 121 | if (typeof r.SetVariable != "undefined") { 122 | return r; 123 | } 124 | else { 125 | var o = r.getElementsByTagName("object"); 126 | var e = r.getElementsByTagName("embed"); 127 | for (i = 0; i < o.length; i++) { 128 | if (typeof o[i].browserURLChange != "undefined") 129 | return o[i]; 130 | } 131 | for (i = 0; i < e.length; i++) { 132 | if (typeof e[i].browserURLChange != "undefined") 133 | return e[i]; 134 | } 135 | } 136 | } 137 | else { 138 | var o = document.getElementsByTagName("object"); 139 | var e = document.getElementsByTagName("embed"); 140 | for (i = 0; i < e.length; i++) { 141 | if (typeof e[i].browserURLChange != "undefined") 142 | { 143 | return e[i]; 144 | } 145 | } 146 | for (i = 0; i < o.length; i++) { 147 | if (typeof o[i].browserURLChange != "undefined") 148 | { 149 | return o[i]; 150 | } 151 | } 152 | } 153 | return undefined; 154 | } 155 | 156 | function getPlayers() { 157 | var i; 158 | var players = []; 159 | if (players.length == 0) { 160 | var tmp = document.getElementsByTagName('object'); 161 | for (i = 0; i < tmp.length; i++) 162 | { 163 | if (typeof tmp[i].browserURLChange != "undefined") 164 | players.push(tmp[i]); 165 | } 166 | } 167 | if (players.length == 0 || players[0].object == null) { 168 | var tmp = document.getElementsByTagName('embed'); 169 | for (i = 0; i < tmp.length; i++) 170 | { 171 | if (typeof tmp[i].browserURLChange != "undefined") 172 | players.push(tmp[i]); 173 | } 174 | } 175 | return players; 176 | } 177 | 178 | function getIframeHash() { 179 | var doc = getHistoryFrame().contentWindow.document; 180 | var hash = String(doc.location.search); 181 | if (hash.length == 1 && hash.charAt(0) == "?") { 182 | hash = ""; 183 | } 184 | else if (hash.length >= 2 && hash.charAt(0) == "?") { 185 | hash = hash.substring(1); 186 | } 187 | return hash; 188 | } 189 | 190 | /* Get the current location hash excluding the '#' symbol. */ 191 | function getHash() { 192 | // It would be nice if we could use document.location.hash here, 193 | // but it's faulty sometimes. 194 | var idx = document.location.href.indexOf('#'); 195 | return (idx >= 0) ? document.location.href.substr(idx+1) : ''; 196 | } 197 | 198 | /* Get the current location hash excluding the '#' symbol. */ 199 | function setHash(hash) { 200 | // It would be nice if we could use document.location.hash here, 201 | // but it's faulty sometimes. 202 | if (hash == '') hash = '#' 203 | document.location.hash = hash; 204 | } 205 | 206 | function createState(baseUrl, newUrl, flexAppUrl) { 207 | return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null }; 208 | } 209 | 210 | /* Add a history entry to the browser. 211 | * baseUrl: the portion of the location prior to the '#' 212 | * newUrl: the entire new URL, including '#' and following fragment 213 | * flexAppUrl: the portion of the location following the '#' only 214 | */ 215 | function addHistoryEntry(baseUrl, newUrl, flexAppUrl) { 216 | 217 | //delete all the history entries 218 | forwardStack = []; 219 | 220 | if (browser.ie) { 221 | //Check to see if we are being asked to do a navigate for the first 222 | //history entry, and if so ignore, because it's coming from the creation 223 | //of the history iframe 224 | if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) { 225 | currentHref = initialHref; 226 | return; 227 | } 228 | if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) { 229 | newUrl = baseUrl + '#' + defaultHash; 230 | flexAppUrl = defaultHash; 231 | } else { 232 | // for IE, tell the history frame to go somewhere without a '#' 233 | // in order to get this entry into the browser history. 234 | getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl; 235 | } 236 | setHash(flexAppUrl); 237 | } else { 238 | 239 | //ADR 240 | if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) { 241 | initialState = createState(baseUrl, newUrl, flexAppUrl); 242 | } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) { 243 | backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl); 244 | } 245 | 246 | if (browser.safari && !browserHasHashChange) { 247 | // for Safari, submit a form whose action points to the desired URL 248 | if (browser.version <= 419.3) { 249 | var file = window.location.pathname.toString(); 250 | file = file.substring(file.lastIndexOf("/")+1); 251 | getFormElement().innerHTML = '
'; 252 | //get the current elements and add them to the form 253 | var qs = window.location.search.substring(1); 254 | var qs_arr = qs.split("&"); 255 | for (var i = 0; i < qs_arr.length; i++) { 256 | var tmp = qs_arr[i].split("="); 257 | var elem = document.createElement("input"); 258 | elem.type = "hidden"; 259 | elem.name = tmp[0]; 260 | elem.value = tmp[1]; 261 | document.forms.historyForm.appendChild(elem); 262 | } 263 | document.forms.historyForm.submit(); 264 | } else { 265 | top.location.hash = flexAppUrl; 266 | } 267 | // We also have to maintain the history by hand for Safari 268 | historyHash[history.length] = flexAppUrl; 269 | _storeStates(); 270 | } else { 271 | // Otherwise, just tell the browser to go there 272 | setHash(flexAppUrl); 273 | } 274 | } 275 | backStack.push(createState(baseUrl, newUrl, flexAppUrl)); 276 | } 277 | 278 | function _storeStates() { 279 | if (browser.safari) { 280 | getRememberElement().value = historyHash.join(","); 281 | } 282 | } 283 | 284 | function handleBackButton() { 285 | //The "current" page is always at the top of the history stack. 286 | var current = backStack.pop(); 287 | if (!current) { return; } 288 | var last = backStack[backStack.length - 1]; 289 | if (!last && backStack.length == 0){ 290 | last = initialState; 291 | } 292 | forwardStack.push(current); 293 | } 294 | 295 | function handleForwardButton() { 296 | //summary: private method. Do not call this directly. 297 | 298 | var last = forwardStack.pop(); 299 | if (!last) { return; } 300 | backStack.push(last); 301 | } 302 | 303 | function handleArbitraryUrl() { 304 | //delete all the history entries 305 | forwardStack = []; 306 | } 307 | 308 | /* Called periodically to poll to see if we need to detect navigation that has occurred */ 309 | function checkForUrlChange() { 310 | 311 | if (browser.ie) { 312 | if (currentHref != document.location.href && currentHref + '#' != document.location.href) { 313 | //This occurs when the user has navigated to a specific URL 314 | //within the app, and didn't use browser back/forward 315 | //IE seems to have a bug where it stops updating the URL it 316 | //shows the end-user at this point, but programatically it 317 | //appears to be correct. Do a full app reload to get around 318 | //this issue. 319 | if (browser.version < 7) { 320 | currentHref = document.location.href; 321 | document.location.reload(); 322 | } else { 323 | if (getHash() != getIframeHash()) { 324 | // this.iframe.src = this.blankURL + hash; 325 | var sourceToSet = historyFrameSourcePrefix + getHash(); 326 | getHistoryFrame().src = sourceToSet; 327 | currentHref = document.location.href; 328 | } 329 | } 330 | } 331 | } 332 | 333 | if (browser.safari && !browserHasHashChange) { 334 | // For Safari, we have to check to see if history.length changed. 335 | if (currentHistoryLength >= 0 && history.length != currentHistoryLength) { 336 | //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|")); 337 | var flexAppUrl = getHash(); 338 | if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */) 339 | { 340 | // If it did change and we're running Safari 3.x or earlier, 341 | // then we have to look the old state up in our hand-maintained 342 | // array since document.location.hash won't have changed, 343 | // then call back into BrowserManager. 344 | currentHistoryLength = history.length; 345 | flexAppUrl = historyHash[currentHistoryLength]; 346 | } 347 | 348 | //ADR: to fix multiple 349 | if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { 350 | var pl = getPlayers(); 351 | for (var i = 0; i < pl.length; i++) { 352 | pl[i].browserURLChange(flexAppUrl); 353 | } 354 | } else { 355 | getPlayer().browserURLChange(flexAppUrl); 356 | } 357 | _storeStates(); 358 | } 359 | } 360 | if (browser.firefox && !browserHasHashChange) { 361 | if (currentHref != document.location.href) { 362 | var bsl = backStack.length; 363 | 364 | var urlActions = { 365 | back: false, 366 | forward: false, 367 | set: false 368 | } 369 | 370 | if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) { 371 | urlActions.back = true; 372 | // FIXME: could this ever be a forward button? 373 | // we can't clear it because we still need to check for forwards. Ugg. 374 | // clearInterval(this.locationTimer); 375 | handleBackButton(); 376 | } 377 | 378 | // first check to see if we could have gone forward. We always halt on 379 | // a no-hash item. 380 | if (forwardStack.length > 0) { 381 | if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) { 382 | urlActions.forward = true; 383 | handleForwardButton(); 384 | } 385 | } 386 | 387 | // ok, that didn't work, try someplace back in the history stack 388 | if ((bsl >= 2) && (backStack[bsl - 2])) { 389 | if (backStack[bsl - 2].flexAppUrl == getHash()) { 390 | urlActions.back = true; 391 | handleBackButton(); 392 | } 393 | } 394 | 395 | if (!urlActions.back && !urlActions.forward) { 396 | var foundInStacks = { 397 | back: -1, 398 | forward: -1 399 | } 400 | 401 | for (var i = 0; i < backStack.length; i++) { 402 | if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) { 403 | arbitraryUrl = true; 404 | foundInStacks.back = i; 405 | } 406 | } 407 | for (var i = 0; i < forwardStack.length; i++) { 408 | if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) { 409 | arbitraryUrl = true; 410 | foundInStacks.forward = i; 411 | } 412 | } 413 | handleArbitraryUrl(); 414 | } 415 | 416 | // Firefox changed; do a callback into BrowserManager to tell it. 417 | currentHref = document.location.href; 418 | var flexAppUrl = getHash(); 419 | //ADR: to fix multiple 420 | if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { 421 | var pl = getPlayers(); 422 | for (var i = 0; i < pl.length; i++) { 423 | pl[i].browserURLChange(flexAppUrl); 424 | } 425 | } else { 426 | getPlayer().browserURLChange(flexAppUrl); 427 | } 428 | } 429 | } 430 | } 431 | 432 | var _initialize = function () { 433 | 434 | browserHasHashChange = ("onhashchange" in document.body); 435 | 436 | if (browser.ie) 437 | { 438 | var scripts = document.getElementsByTagName('script'); 439 | for (var i = 0, s; s = scripts[i]; i++) { 440 | if (s.src.indexOf("history.js") > -1) { 441 | var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html"); 442 | } 443 | } 444 | historyFrameSourcePrefix = iframe_location + "?"; 445 | var src = historyFrameSourcePrefix; 446 | 447 | var iframe = document.createElement("iframe"); 448 | iframe.id = 'ie_historyFrame'; 449 | iframe.name = 'ie_historyFrame'; 450 | iframe.src = 'javascript:false;'; 451 | 452 | try { 453 | document.body.appendChild(iframe); 454 | } catch(e) { 455 | setTimeout(function() { 456 | document.body.appendChild(iframe); 457 | }, 0); 458 | } 459 | } 460 | 461 | if (browser.safari && !browserHasHashChange) 462 | { 463 | var rememberDiv = document.createElement("div"); 464 | rememberDiv.id = 'safari_rememberDiv'; 465 | document.body.appendChild(rememberDiv); 466 | rememberDiv.innerHTML = ''; 467 | 468 | var formDiv = document.createElement("div"); 469 | formDiv.id = 'safari_formDiv'; 470 | document.body.appendChild(formDiv); 471 | 472 | var reloader_content = document.createElement('div'); 473 | reloader_content.id = 'safarireloader'; 474 | var scripts = document.getElementsByTagName('script'); 475 | for (var i = 0, s; s = scripts[i]; i++) { 476 | if (s.src.indexOf("history.js") > -1) { 477 | html = (new String(s.src)).replace(".js", ".html"); 478 | } 479 | } 480 | reloader_content.innerHTML = ''; 481 | document.body.appendChild(reloader_content); 482 | reloader_content.style.position = 'absolute'; 483 | reloader_content.style.left = reloader_content.style.top = '-9999px'; 484 | iframe = reloader_content.getElementsByTagName('iframe')[0]; 485 | 486 | if (document.getElementById("safari_remember_field").value != "" ) { 487 | historyHash = document.getElementById("safari_remember_field").value.split(","); 488 | } 489 | } 490 | 491 | if (browserHasHashChange) 492 | document.body.onhashchange = hashChangeHandler; 493 | } 494 | 495 | return { 496 | historyHash: historyHash, 497 | backStack: function() { return backStack; }, 498 | forwardStack: function() { return forwardStack }, 499 | getPlayer: getPlayer, 500 | initialize: function(src) { 501 | _initialize(src); 502 | }, 503 | setURL: function(url) { 504 | document.location.href = url; 505 | }, 506 | getURL: function() { 507 | return document.location.href; 508 | }, 509 | getTitle: function() { 510 | return document.title; 511 | }, 512 | setTitle: function(title) { 513 | try { 514 | backStack[backStack.length - 1].title = title; 515 | } catch(e) { } 516 | //if on safari, set the title to be the empty string. 517 | if (browser.safari) { 518 | if (title == "") { 519 | try { 520 | var tmp = window.location.href.toString(); 521 | title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#")); 522 | } catch(e) { 523 | title = ""; 524 | } 525 | } 526 | } 527 | document.title = title; 528 | }, 529 | setDefaultURL: function(def) 530 | { 531 | defaultHash = def; 532 | def = getHash(); 533 | //trailing ? is important else an extra frame gets added to the history 534 | //when navigating back to the first page. Alternatively could check 535 | //in history frame navigation to compare # and ?. 536 | if (browser.ie) 537 | { 538 | window['_ie_firstload'] = true; 539 | var sourceToSet = historyFrameSourcePrefix + def; 540 | var func = function() { 541 | getHistoryFrame().src = sourceToSet; 542 | window.location.replace("#" + def); 543 | setInterval(checkForUrlChange, 50); 544 | } 545 | try { 546 | func(); 547 | } catch(e) { 548 | window.setTimeout(function() { func(); }, 0); 549 | } 550 | } 551 | 552 | if (browser.safari) 553 | { 554 | currentHistoryLength = history.length; 555 | if (historyHash.length == 0) { 556 | historyHash[currentHistoryLength] = def; 557 | var newloc = "#" + def; 558 | window.location.replace(newloc); 559 | } else { 560 | //alert(historyHash[historyHash.length-1]); 561 | } 562 | setInterval(checkForUrlChange, 50); 563 | } 564 | 565 | 566 | if (browser.firefox || browser.opera) 567 | { 568 | var reg = new RegExp("#" + def + "$"); 569 | if (window.location.toString().match(reg)) { 570 | } else { 571 | var newloc ="#" + def; 572 | window.location.replace(newloc); 573 | } 574 | setInterval(checkForUrlChange, 50); 575 | } 576 | 577 | }, 578 | 579 | /* Set the current browser URL; called from inside BrowserManager to propagate 580 | * the application state out to the container. 581 | */ 582 | setBrowserURL: function(flexAppUrl, objectId) { 583 | if (browser.ie && typeof objectId != "undefined") { 584 | currentObjectId = objectId; 585 | } 586 | //fromIframe = fromIframe || false; 587 | //fromFlex = fromFlex || false; 588 | //alert("setBrowserURL: " + flexAppUrl); 589 | //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ; 590 | 591 | var pos = document.location.href.indexOf('#'); 592 | var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href; 593 | var newUrl = baseUrl + '#' + flexAppUrl; 594 | 595 | if (document.location.href != newUrl && document.location.href + '#' != newUrl) { 596 | currentHref = newUrl; 597 | addHistoryEntry(baseUrl, newUrl, flexAppUrl); 598 | currentHistoryLength = history.length; 599 | } 600 | }, 601 | 602 | browserURLChange: function(flexAppUrl) { 603 | var objectId = null; 604 | if (browser.ie && currentObjectId != null) { 605 | objectId = currentObjectId; 606 | } 607 | 608 | if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { 609 | var pl = getPlayers(); 610 | for (var i = 0; i < pl.length; i++) { 611 | try { 612 | pl[i].browserURLChange(flexAppUrl); 613 | } catch(e) { } 614 | } 615 | } else { 616 | try { 617 | getPlayer(objectId).browserURLChange(flexAppUrl); 618 | } catch(e) { } 619 | } 620 | 621 | currentObjectId = null; 622 | }, 623 | getUserAgent: function() { 624 | return navigator.userAgent; 625 | }, 626 | getPlatform: function() { 627 | return navigator.platform; 628 | } 629 | 630 | } 631 | 632 | })(); 633 | 634 | // Initialization 635 | 636 | // Automated unit testing and other diagnostics 637 | 638 | function setURL(url) 639 | { 640 | document.location.href = url; 641 | } 642 | 643 | function backButton() 644 | { 645 | history.back(); 646 | } 647 | 648 | function forwardButton() 649 | { 650 | history.forward(); 651 | } 652 | 653 | function goForwardOrBackInHistory(step) 654 | { 655 | history.go(step); 656 | } 657 | 658 | //BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); }); 659 | (function(i) { 660 | var u =navigator.userAgent;var e=/*@cc_on!@*/false; 661 | var st = setTimeout; 662 | if(/webkit/i.test(u)){ 663 | st(function(){ 664 | var dr=document.readyState; 665 | if(dr=="loaded"||dr=="complete"){i()} 666 | else{st(arguments.callee,10);}},10); 667 | } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){ 668 | document.addEventListener("DOMContentLoaded",i,false); 669 | } else if(e){ 670 | (function(){ 671 | var t=document.createElement('doc:rdy'); 672 | try{t.doScroll('left'); 673 | i();t=null; 674 | }catch(e){st(arguments.callee,0);}})(); 675 | } else{ 676 | window.onload=i; 677 | } 678 | })( function() {BrowserHistory.initialize();} ); 679 | -------------------------------------------------------------------------------- /public/history/historyFrame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 27 | Hidden frame for Browser History support. 28 | 29 | 30 | -------------------------------------------------------------------------------- /public/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/images/favicon.ico -------------------------------------------------------------------------------- /public/javascripts/ie10-viewport-bug-workaround.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * IE10 viewport hack for Surface/desktop Windows 8 bug 3 | * Copyright 2014-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | // See the Getting Started docs for more information: 8 | // http://getbootstrap.com/getting-started/#support-ie10-width 9 | 10 | (function () { 11 | 'use strict'; 12 | 13 | if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 14 | var msViewportStyle = document.createElement('style') 15 | msViewportStyle.appendChild( 16 | document.createTextNode( 17 | '@-ms-viewport{width:auto!important}' 18 | ) 19 | ) 20 | document.querySelector('head').appendChild(msViewportStyle) 21 | } 22 | 23 | })(); 24 | -------------------------------------------------------------------------------- /public/playerProductInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jichuntao/online_compiler/064ccd0b04bea6fa985a536438ff8f7142620570/public/playerProductInstall.swf -------------------------------------------------------------------------------- /public/stylesheets/blog.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Globals 3 | */ 4 | 5 | @media (min-width: 48em) { 6 | html { 7 | font-size: 18px; 8 | } 9 | } 10 | 11 | body { 12 | color: #555; 13 | } 14 | 15 | h1, .h1, 16 | h2, .h2, 17 | h3, .h3, 18 | h4, .h4, 19 | h5, .h5, 20 | h6, .h6 { 21 | font-weight: normal; 22 | color: #333; 23 | } 24 | 25 | 26 | /* 27 | * Override Bootstrap's default container. 28 | */ 29 | 30 | .container { 31 | max-width: 60rem; 32 | } 33 | 34 | 35 | /* 36 | * Masthead for nav 37 | */ 38 | 39 | .blog-masthead { 40 | margin-bottom: 0rem; 41 | background-color: #428bca; 42 | -webkit-box-shadow: inset 0 -.1rem .25rem rgba(0,0,0,.1); 43 | box-shadow: inset 0 -.1rem .25rem rgba(0,0,0,.1); 44 | } 45 | 46 | /* Nav links */ 47 | .nav-link { 48 | position: relative; 49 | padding: 1rem; 50 | font-weight: 500; 51 | color: #cdddeb; 52 | } 53 | .nav-link:hover, 54 | .nav-link:focus { 55 | color: #fff; 56 | background-color: transparent; 57 | } 58 | 59 | /* Active state gets a caret at the bottom */ 60 | .nav-link.active { 61 | color: #fff; 62 | } 63 | .nav-link.active:after { 64 | position: absolute; 65 | bottom: 0; 66 | left: 50%; 67 | width: 0; 68 | height: 0; 69 | margin-left: -.3rem; 70 | vertical-align: middle; 71 | content: ""; 72 | border-right: .3rem solid transparent; 73 | border-bottom: .3rem solid; 74 | border-left: .3rem solid transparent; 75 | } 76 | 77 | 78 | /* 79 | * Blog name and description 80 | */ 81 | 82 | .blog-header { 83 | padding-bottom: 1.25rem; 84 | margin-bottom: 2rem; 85 | border-bottom: .05rem solid #eee; 86 | } 87 | .blog-title { 88 | margin-bottom: 0; 89 | font-size: 2rem; 90 | font-weight: normal; 91 | } 92 | .blog-description { 93 | font-size: 1.1rem; 94 | color: #999; 95 | } 96 | 97 | @media (min-width: 40em) { 98 | .blog-title { 99 | font-size: 3.5rem; 100 | } 101 | } 102 | 103 | 104 | /* 105 | * Main column and sidebar layout 106 | */ 107 | 108 | /* Sidebar modules for boxing content */ 109 | .sidebar-module { 110 | padding: 1rem; 111 | /*margin: 0 -1rem 1rem;*/ 112 | } 113 | .sidebar-module-inset { 114 | padding: 1rem; 115 | background-color: #f5f5f5; 116 | border-radius: .25rem; 117 | } 118 | .sidebar-module-inset p:last-child, 119 | .sidebar-module-inset ul:last-child, 120 | .sidebar-module-inset ol:last-child { 121 | margin-bottom: 0; 122 | } 123 | 124 | 125 | /* Pagination */ 126 | .pager { 127 | margin-bottom: 4rem; 128 | text-align: left; 129 | } 130 | .pager > li > a { 131 | width: 8rem; 132 | padding: .75rem 1.25rem; 133 | text-align: center; 134 | border-radius: 2rem; 135 | } 136 | 137 | 138 | /* 139 | * Blog posts 140 | */ 141 | 142 | .blog-post { 143 | margin-bottom: 4rem; 144 | } 145 | .blog-post-title { 146 | margin-bottom: .25rem; 147 | font-size: 2.5rem; 148 | } 149 | .blog-post-meta { 150 | margin-bottom: 1.25rem; 151 | color: #999; 152 | } 153 | 154 | 155 | /* 156 | * Footer 157 | */ 158 | 159 | .blog-footer { 160 | padding: 2.5rem 0; 161 | color: #999; 162 | text-align: center; 163 | background-color: #f9f9f9; 164 | border-top: .05rem solid #e5e5e5; 165 | } 166 | .blog-footer p:last-child { 167 | margin-bottom: 0; 168 | } 169 | -------------------------------------------------------------------------------- /public/stylesheets/history.css: -------------------------------------------------------------------------------- 1 | /* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */ 2 | 3 | #ie_historyFrame { width: 0px; height: 0px; display:none } 4 | #firefox_anchorDiv { width: 0px; height: 0px; display:none } 5 | #safari_formDiv { width: 0px; height: 0px; display:none } 6 | #safari_rememberDiv { width: 0px; height: 0px; display:none } 7 | -------------------------------------------------------------------------------- /public/stylesheets/sticky-footer.css: -------------------------------------------------------------------------------- 1 | /* Sticky footer styles 2 | -------------------------------------------------- */ 3 | html { 4 | position: relative; 5 | min-height: 100%; 6 | } 7 | body { 8 | height: 100%; 9 | background-color: #eeeeee; 10 | overflow:auto; text-align:center; 11 | 12 | } 13 | .footer { 14 | position: absolute; 15 | bottom: 0; 16 | width: 100%; 17 | /* Set the fixed height of the footer here */ 18 | height: 60px; 19 | background-color: #f5f5f5; 20 | } 21 | 22 | 23 | /* Custom page CSS 24 | -------------------------------------------------- */ 25 | /* Not required for template or sticky footer method. */ 26 | 27 | .container { 28 | width: auto; 29 | max-width: 680px; 30 | padding: 0 15px; 31 | } 32 | .container .text-muted { 33 | margin: 20px 0; 34 | } 35 | -------------------------------------------------------------------------------- /public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } 9 | -------------------------------------------------------------------------------- /routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function(req, res, next) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | /* ble60 */ 10 | router.get('/ble60', function(req, res, next) { 11 | res.render('keyboard', { kbtype: 'ble60' }); 12 | }); 13 | 14 | /* kc60 */ 15 | router.get('/kc60', function(req, res, next) { 16 | res.render('keyboard', { kbtype: 'kc60' }); 17 | }); 18 | 19 | /* epbt60 */ 20 | router.get('/epbt60', function(req, res, next) { 21 | res.render('keyboard', { kbtype: 'epbt60' }); 22 | }); 23 | 24 | /* epbt60v2 */ 25 | router.get('/epbt60v2', function(req, res, next) { 26 | res.render('keyboard', { kbtype: 'epbt60v2' }); 27 | }); 28 | 29 | /* diyso60 */ 30 | router.get('/diyso60', function(req, res, next) { 31 | res.render('keyboard', { kbtype: 'diyso60' }); 32 | }); 33 | 34 | /* epbt75 */ 35 | router.get('/epbt75', function(req, res, next) { 36 | res.render('keyboard', { kbtype: 'epbt75' }); 37 | }); 38 | 39 | /* test2 */ 40 | router.get('/index2', function(req, res, next) { 41 | res.render('epbt75', { kbtype: 'epbt75' }); 42 | }); 43 | 44 | /* diyer72 */ 45 | router.get('/diyer72', function(req, res, next) { 46 | res.render('diyso72', { kbtype: 'diyso72' }); 47 | }); 48 | 49 | /* kb68 */ 50 | router.get('/tada68', function(req, res, next) { 51 | res.render('kb68', { kbtype: 'kb68' }); 52 | }); 53 | module.exports = router; 54 | -------------------------------------------------------------------------------- /test/cls1.js: -------------------------------------------------------------------------------- 1 | 2 | function class1() 3 | { 4 | this.fun1=function (){ 5 | console.log('class1 fun1'); 6 | fun4(); 7 | } 8 | this.fun2=function(){ 9 | console.log('class1 fun2'); 10 | } 11 | var fun3 =function(){ 12 | console.log('class1 fun3'); 13 | }; 14 | function fun4() 15 | { 16 | console.log('class1 fun4'); 17 | } 18 | } 19 | var ss = new class1(); 20 | ss.fun1(); -------------------------------------------------------------------------------- /test/epbt60/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "matrix": [ 3 | [ 4 | { 5 | "c": 0, 6 | "m": 0, 7 | "r": 0, 8 | "w": 1 9 | }, 10 | { 11 | "c": 1, 12 | "m": 0, 13 | "r": 0, 14 | "w": 1 15 | }, 16 | { 17 | "c": 2, 18 | "m": 0, 19 | "r": 0, 20 | "w": 1 21 | }, 22 | { 23 | "c": 3, 24 | "m": 0, 25 | "r": 0, 26 | "w": 1 27 | }, 28 | { 29 | "c": 4, 30 | "m": 0, 31 | "r": 0, 32 | "w": 1 33 | }, 34 | { 35 | "c": 5, 36 | "m": 0, 37 | "r": 0, 38 | "w": 1 39 | }, 40 | { 41 | "c": 6, 42 | "m": 0, 43 | "r": 0, 44 | "w": 1 45 | }, 46 | { 47 | "c": 7, 48 | "m": 0, 49 | "r": 0, 50 | "w": 1 51 | }, 52 | { 53 | "c": 8, 54 | "m": 0, 55 | "r": 0, 56 | "w": 1 57 | }, 58 | { 59 | "c": 9, 60 | "m": 0, 61 | "r": 0, 62 | "w": 1 63 | }, 64 | { 65 | "c": 10, 66 | "m": 0, 67 | "r": 0, 68 | "w": 1 69 | }, 70 | { 71 | "c": 11, 72 | "m": 0, 73 | "r": 0, 74 | "w": 1 75 | }, 76 | { 77 | "c": 12, 78 | "m": 0, 79 | "r": 0, 80 | "w": 1 81 | }, 82 | { 83 | "s": [ 84 | [ 85 | { 86 | "c": 13, 87 | "r": 0, 88 | "w": 2 89 | } 90 | ], 91 | [ 92 | { 93 | "c": 13, 94 | "r": 0, 95 | "w": 1 96 | }, 97 | { 98 | "c": 9, 99 | "r": 4, 100 | "w": 1 101 | } 102 | ] 103 | ], 104 | "m": 1, 105 | "w": 2 106 | } 107 | ], 108 | [ 109 | { 110 | "c": 0, 111 | "m": 0, 112 | "r": 1, 113 | "w": 1.5 114 | }, 115 | { 116 | "c": 1, 117 | "m": 0, 118 | "r": 1, 119 | "w": 1 120 | }, 121 | { 122 | "c": 2, 123 | "m": 0, 124 | "r": 1, 125 | "w": 1 126 | }, 127 | { 128 | "c": 3, 129 | "m": 0, 130 | "r": 1, 131 | "w": 1 132 | }, 133 | { 134 | "c": 4, 135 | "m": 0, 136 | "r": 1, 137 | "w": 1 138 | }, 139 | { 140 | "c": 5, 141 | "m": 0, 142 | "r": 1, 143 | "w": 1 144 | }, 145 | { 146 | "c": 6, 147 | "m": 0, 148 | "r": 1, 149 | "w": 1 150 | }, 151 | { 152 | "c": 7, 153 | "m": 0, 154 | "r": 1, 155 | "w": 1 156 | }, 157 | { 158 | "c": 8, 159 | "m": 0, 160 | "r": 1, 161 | "w": 1 162 | }, 163 | { 164 | "c": 9, 165 | "m": 0, 166 | "r": 1, 167 | "w": 1 168 | }, 169 | { 170 | "c": 10, 171 | "m": 0, 172 | "r": 1, 173 | "w": 1 174 | }, 175 | { 176 | "c": 11, 177 | "m": 0, 178 | "r": 1, 179 | "w": 1 180 | }, 181 | { 182 | "c": 12, 183 | "m": 0, 184 | "r": 1, 185 | "w": 1 186 | }, 187 | { 188 | "c": 13, 189 | "m": 0, 190 | "r": 1, 191 | "w": 1.5 192 | } 193 | ], 194 | [ 195 | { 196 | "c": 0, 197 | "m": 0, 198 | "r": 2, 199 | "w": 1.75 200 | }, 201 | { 202 | "c": 1, 203 | "m": 0, 204 | "r": 2, 205 | "w": 1 206 | }, 207 | { 208 | "c": 2, 209 | "m": 0, 210 | "r": 2, 211 | "w": 1 212 | }, 213 | { 214 | "c": 3, 215 | "m": 0, 216 | "r": 2, 217 | "w": 1 218 | }, 219 | { 220 | "c": 4, 221 | "m": 0, 222 | "r": 2, 223 | "w": 1 224 | }, 225 | { 226 | "c": 5, 227 | "m": 0, 228 | "r": 2, 229 | "w": 1 230 | }, 231 | { 232 | "c": 6, 233 | "m": 0, 234 | "r": 2, 235 | "w": 1 236 | }, 237 | { 238 | "c": 7, 239 | "m": 0, 240 | "r": 2, 241 | "w": 1 242 | }, 243 | { 244 | "c": 8, 245 | "m": 0, 246 | "r": 2, 247 | "w": 1 248 | }, 249 | { 250 | "c": 9, 251 | "m": 0, 252 | "r": 2, 253 | "w": 1 254 | }, 255 | { 256 | "c": 10, 257 | "m": 0, 258 | "r": 2, 259 | "w": 1 260 | }, 261 | { 262 | "c": 11, 263 | "m": 0, 264 | "r": 2, 265 | "w": 1 266 | }, 267 | { 268 | "s": [ 269 | [ 270 | { 271 | "c": 13, 272 | "r": 2, 273 | "w": 2.25 274 | } 275 | ], 276 | [ 277 | { 278 | "c": 12, 279 | "r": 2, 280 | "w": 1 281 | }, 282 | { 283 | "c": 13, 284 | "r": 2, 285 | "w": 1.25 286 | } 287 | ] 288 | ], 289 | "m": 2, 290 | "w": 2.25 291 | } 292 | ], 293 | [ 294 | { 295 | "s": [ 296 | [ 297 | { 298 | "c": 0, 299 | "r": 3, 300 | "w": 2.25 301 | } 302 | ], 303 | [ 304 | { 305 | "c": 0, 306 | "r": 3, 307 | "w": 1.25 308 | }, 309 | { 310 | "c": 1, 311 | "r": 3, 312 | "w": 1 313 | } 314 | ] 315 | ], 316 | "m": 3, 317 | "w": 2.25 318 | }, 319 | { 320 | "c": 2, 321 | "m": 0, 322 | "r": 3, 323 | "w": 1 324 | }, 325 | { 326 | "c": 3, 327 | "m": 0, 328 | "r": 3, 329 | "w": 1 330 | }, 331 | { 332 | "c": 4, 333 | "m": 0, 334 | "r": 3, 335 | "w": 1 336 | }, 337 | { 338 | "c": 5, 339 | "m": 0, 340 | "r": 3, 341 | "w": 1 342 | }, 343 | { 344 | "c": 6, 345 | "m": 0, 346 | "r": 3, 347 | "w": 1 348 | }, 349 | { 350 | "c": 7, 351 | "m": 0, 352 | "r": 3, 353 | "w": 1 354 | }, 355 | { 356 | "c": 8, 357 | "m": 0, 358 | "r": 3, 359 | "w": 1 360 | }, 361 | { 362 | "c": 9, 363 | "m": 0, 364 | "r": 3, 365 | "w": 1 366 | }, 367 | { 368 | "c": 10, 369 | "m": 0, 370 | "r": 3, 371 | "w": 1 372 | }, 373 | { 374 | "c": 11, 375 | "m": 0, 376 | "r": 3, 377 | "w": 1 378 | }, 379 | { 380 | "s": [ 381 | [ 382 | { 383 | "c": 13, 384 | "r": 3, 385 | "w": 2.75 386 | } 387 | ], 388 | [ 389 | { 390 | "c": 12, 391 | "r": 3, 392 | "w": 1 393 | }, 394 | { 395 | "c": 13, 396 | "r": 3, 397 | "w": 1.75 398 | } 399 | ], 400 | [ 401 | { 402 | "c": 13, 403 | "r": 3, 404 | "w": 1.75 405 | }, 406 | { 407 | "c": 12, 408 | "r": 3, 409 | "w": 1 410 | } 411 | ] 412 | ], 413 | "m": 4, 414 | "w": 2.75 415 | } 416 | ], 417 | [ 418 | { 419 | "s": [ 420 | [ 421 | { 422 | "c": 0, 423 | "r": 4, 424 | "w": 1.25 425 | }, 426 | { 427 | "c": 1, 428 | "r": 4, 429 | "w": 1.25 430 | }, 431 | { 432 | "c": 2, 433 | "r": 4, 434 | "w": 1.25 435 | }, 436 | { 437 | "c": 5, 438 | "r": 4, 439 | "w": 6.25 440 | }, 441 | { 442 | "c": 10, 443 | "r": 4, 444 | "w": 1.25 445 | }, 446 | { 447 | "c": 11, 448 | "r": 4, 449 | "w": 1.25 450 | }, 451 | { 452 | "c": 12, 453 | "r": 4, 454 | "w": 1.25 455 | }, 456 | { 457 | "c": 13, 458 | "r": 4, 459 | "w": 1.25 460 | } 461 | ], 462 | [ 463 | { 464 | "c": 0, 465 | "r": 4, 466 | "w": 1.5 467 | }, 468 | { 469 | "c": 1, 470 | "r": 4, 471 | "w": 1 472 | }, 473 | { 474 | "c": 2, 475 | "r": 4, 476 | "w": 1.5 477 | }, 478 | { 479 | "c": 5, 480 | "r": 4, 481 | "w": 7 482 | }, 483 | { 484 | "c": 11, 485 | "r": 4, 486 | "w": 1.5 487 | }, 488 | { 489 | "c": 12, 490 | "r": 4, 491 | "w": 1 492 | }, 493 | { 494 | "c": 13, 495 | "r": 4, 496 | "w": 1.5 497 | } 498 | ], 499 | [ 500 | { 501 | "c": 0, 502 | "r": 4, 503 | "w": 1.5 504 | }, 505 | { 506 | "c": 1, 507 | "r": 4, 508 | "w": 1, 509 | "n": 1 510 | }, 511 | { 512 | "c": 2, 513 | "r": 4, 514 | "w": 1.5 515 | }, 516 | { 517 | "c": 5, 518 | "r": 4, 519 | "w": 7 520 | }, 521 | { 522 | "c": 11, 523 | "r": 4, 524 | "w": 1.5 525 | }, 526 | { 527 | "c": 12, 528 | "r": 4, 529 | "w": 1, 530 | "n": 1 531 | }, 532 | { 533 | "c": 13, 534 | "r": 4, 535 | "w": 1.5 536 | } 537 | ], 538 | [ 539 | { 540 | "c": 0, 541 | "r": 4, 542 | "w": 1.5, 543 | "n": 1 544 | }, 545 | { 546 | "c": 1, 547 | "r": 4, 548 | "w": 1 549 | }, 550 | { 551 | "c": 2, 552 | "r": 4, 553 | "w": 1.5 554 | }, 555 | { 556 | "c": 5, 557 | "r": 4, 558 | "w": 7 559 | }, 560 | { 561 | "c": 11, 562 | "r": 4, 563 | "w": 1.5 564 | }, 565 | { 566 | "c": 12, 567 | "r": 4, 568 | "w": 1 569 | }, 570 | { 571 | "c": 13, 572 | "r": 4, 573 | "w": 1.5, 574 | "n": 1 575 | } 576 | ] 577 | ], 578 | "m": 5, 579 | "w": 15 580 | } 581 | ] 582 | ], 583 | "h": 5, 584 | "w": 15, 585 | "row": 5, 586 | "col": 14 587 | } -------------------------------------------------------------------------------- /test/epbt60/create_keymap.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var Config = require('./config.json'); 3 | var FnType = require('./fntype.json'); 4 | var KeycodeToKey = require('./keycodeToKey.json'); 5 | var numToStr=['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G']; 6 | var row=Config.row; 7 | var col=Config.col; 8 | var kbType='EPBT60'; 9 | var corePath='epbt60'; 10 | 11 | function create_keymap_file(data) 12 | { 13 | var ret={}; 14 | var keymap_Data=''; 15 | var i,j,k; 16 | var layout=data[0]; 17 | var layers=data[1]; 18 | var fnArr=[]; 19 | var macroArr=[]; 20 | var matrix=handle_matrix(layout); 21 | if(checkError(matrix,layers)){ 22 | ret.status='error'; 23 | ret.msg='checkerror'; 24 | return ret; 25 | } 26 | try 27 | { 28 | keymap_Data += '// Generated by Online_Complier\n'; 29 | keymap_Data += '#include "../tmk_keyboard/keyboard/'+corePath+'/keymap_common.h"\n\n'; 30 | keymap_Data += keymap_common(matrix); 31 | keymap_Data += keymap_layer(matrix,layers,fnArr,macroArr); 32 | keymap_Data += keymap_speicalKey(); 33 | var fnStr = handleFunction(fnArr,macroArr); 34 | var macroStr = handleMacro(macroArr); 35 | keymap_Data += macroStr; 36 | keymap_Data += fnStr; 37 | } 38 | catch(e){ 39 | ret.status='error'; 40 | ret.msg='checkerror2'; 41 | return ret; 42 | } 43 | 44 | ret.keymap_Data=keymap_Data; 45 | return ret; 46 | } 47 | 48 | function handleMacro(macroArr) 49 | { 50 | if(macroArr.length<=0){ 51 | return ''; 52 | } 53 | var ret = 'enum macro_id {\n'; 54 | var i=0; 55 | ret+=tableStr(4); 56 | for(i=0;ievent.pressed ? MACRO('; 65 | if(!macroArr[i].length){ 66 | continue; 67 | } 68 | for(var j=0;j0){ 136 | fnOutArr[i].args[0]=modArr.join(' | '); 137 | }else{ 138 | fnOutArr[i].action=FnType.fntype[0].action; 139 | fnOutArr[i].args=['KC_NO']; 140 | } 141 | } 142 | else if(fncfg.type==5){ 143 | modArr=mod(fndata[0],fndata[1],fndata[2],fndata[3]); 144 | if(modArr.length>0){ 145 | fnOutArr[i].args[0]=modArr.join(' | '); 146 | fnOutArr[i].args[1]=fndata[4]?fndata[4]:'KC_NO'; 147 | }else{ 148 | fnOutArr[i].action=FnType.fntype[0].action; 149 | fnOutArr[i].args[0]=fndata[4]?fndata[4]:'KC_NO'; 150 | } 151 | } 152 | else if(fncfg.type==6){ 153 | fnOutArr[i].args[0]=on[fndata[0]]; 154 | } 155 | else if(fncfg.type==7){ 156 | fnOutArr[i].args[0]='macro_'+pushMacroData(fndata,macroArr); 157 | } 158 | } 159 | else{ 160 | fnOutArr[i].action='ACTION_NO'; 161 | fnOutArr[i].args=[]; 162 | } 163 | } 164 | for(i=0;ievent.pressed) {\n'; 183 | ret+=tableStr(16)+'if (shift_esc_shift_mask) {\n'; 184 | ret+=tableStr(20)+'add_key(KC_GRV);\n'; 185 | ret+=tableStr(16)+'} else {\n'; 186 | ret+=tableStr(20)+'add_key(KC_ESC);\n'; 187 | ret+=tableStr(16)+'}\n'; 188 | ret+=tableStr(12)+'} else {\n'; 189 | ret+=tableStr(14)+'if (shift_esc_shift_mask) {\n'; 190 | ret+=tableStr(20)+'del_key(KC_GRV);\n'; 191 | ret+=tableStr(16)+'} else {\n'; 192 | ret+=tableStr(20)+'del_key(KC_ESC);\n'; 193 | ret+=tableStr(16)+'}\n'; 194 | ret+=tableStr(12)+'}\n'; 195 | ret+=tableStr(12)+'send_keyboard_report();\n'; 196 | ret+=tableStr(12)+'break;\n'; 197 | ret+=tableStr(4)+'}\n'; 198 | ret+='}\n\n'; 199 | return ret; 200 | } 201 | 202 | function handleKey(key,fnArr,macroArr) 203 | { 204 | 205 | var pkey; 206 | if(key[0]==''){ 207 | pkey='TRNS'; 208 | } 209 | else if(key[0]=='KC_FN'){ 210 | pkey='FN'+pushFnData(key[1],fnArr,macroArr); 211 | } 212 | else if(FnType.fntype_sp[key[0]]){ 213 | pkey='FN'+pushFnData(key[0],fnArr,macroArr); 214 | } 215 | else{ 216 | pkey=getkey(key[0]); 217 | } 218 | return pkey; 219 | } 220 | 221 | function pushFnData(fnData,fnArr) 222 | { 223 | var ret=-1; 224 | for(var i=0;i=32){ 236 | ret = 0; 237 | } 238 | return ret; 239 | } 240 | function pushMacroData(macroData,macroArr) 241 | { 242 | var ret=-1; 243 | for(var i=0;i=32){ 255 | ret = 0; 256 | } 257 | return ret; 258 | } 259 | function keymap_layer(matrix,layers,fnArr,macroArr) 260 | { 261 | var ret='const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\n\n'; 262 | var rows; 263 | var mlayers=[]; 264 | var layer; 265 | var i,j,k; 266 | var keymapCommonArr=[]; 267 | var rows; 268 | for(i=0;ievent.pressed ? MACRO('; 65 | if(!macroArr[i].length){ 66 | continue; 67 | } 68 | for(var j=0;j0){ 136 | fnOutArr[i].args[0]=modArr.join(' | '); 137 | }else{ 138 | fnOutArr[i].action=FnType.fntype[0].action; 139 | fnOutArr[i].args=['KC_NO']; 140 | } 141 | } 142 | else if(fncfg.type==5){ 143 | modArr=mod(fndata[0],fndata[1],fndata[2],fndata[3]); 144 | if(modArr.length>0){ 145 | fnOutArr[i].args[0]=modArr.join(' | '); 146 | fnOutArr[i].args[1]=fndata[4]?fndata[4]:'KC_NO'; 147 | }else{ 148 | fnOutArr[i].action=FnType.fntype[0].action; 149 | fnOutArr[i].args[0]=fndata[4]?fndata[4]:'KC_NO'; 150 | } 151 | } 152 | else if(fncfg.type==6){ 153 | fnOutArr[i].args[0]=on[fndata[0]]; 154 | } 155 | else if(fncfg.type==7){ 156 | fnOutArr[i].args[0]='macro_'+pushMacroData(fndata,macroArr); 157 | } 158 | } 159 | else{ 160 | fnOutArr[i].action='ACTION_NO'; 161 | fnOutArr[i].args=[]; 162 | } 163 | } 164 | for(i=0;ievent.pressed) {\n'; 183 | ret+=tableStr(16)+'if (shift_esc_shift_mask) {\n'; 184 | ret+=tableStr(20)+'add_key(KC_GRV);\n'; 185 | ret+=tableStr(16)+'} else {\n'; 186 | ret+=tableStr(20)+'add_key(KC_ESC);\n'; 187 | ret+=tableStr(16)+'}\n'; 188 | ret+=tableStr(12)+'} else {\n'; 189 | ret+=tableStr(14)+'if (shift_esc_shift_mask) {\n'; 190 | ret+=tableStr(20)+'del_key(KC_GRV);\n'; 191 | ret+=tableStr(16)+'} else {\n'; 192 | ret+=tableStr(20)+'del_key(KC_ESC);\n'; 193 | ret+=tableStr(16)+'}\n'; 194 | ret+=tableStr(12)+'}\n'; 195 | ret+=tableStr(12)+'send_keyboard_report();\n'; 196 | ret+=tableStr(12)+'break;\n'; 197 | ret+=tableStr(4)+'}\n'; 198 | ret+='}\n\n'; 199 | return ret; 200 | } 201 | 202 | function handleKey(key,fnArr,macroArr) 203 | { 204 | 205 | var pkey; 206 | if(key[0]==''){ 207 | pkey='TRNS'; 208 | } 209 | else if(key[0]=='KC_FN'){ 210 | pkey='FN'+pushFnData(key[1],fnArr,macroArr); 211 | } 212 | else if(FnType.fntype_sp[key[0]]){ 213 | pkey='FN'+pushFnData(key[0],fnArr,macroArr); 214 | } 215 | else{ 216 | pkey=getkey(key[0]); 217 | } 218 | return pkey; 219 | } 220 | 221 | function pushFnData(fnData,fnArr) 222 | { 223 | var ret=-1; 224 | for(var i=0;i=32){ 236 | ret = 0; 237 | } 238 | return ret; 239 | } 240 | function pushMacroData(macroData,macroArr) 241 | { 242 | var ret=-1; 243 | for(var i=0;i=32){ 255 | ret = 0; 256 | } 257 | return ret; 258 | } 259 | function keymap_layer(matrix,layers,fnArr,macroArr) 260 | { 261 | var ret='const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\n\n'; 262 | var rows; 263 | var mlayers=[]; 264 | var layer; 265 | var i,j,k; 266 | var keymapCommonArr=[]; 267 | var rows; 268 | for(i=0;i 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Keyboard Editor 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 44 | 67 | 68 | 69 | 70 |
71 |
72 | 75 |
76 |
77 | 78 | 79 |
80 |

81 | To view this page ensure that Adobe Flash Player version 82 | 11.1.0 or greater is installed. 83 |

84 |
85 | 86 | 87 |
88 |

刷机方式:按下键盘PCB背部的刷机按钮,此时键盘会识别为U盘,点击编译固件后,将bin覆盖U盘中的固件然后按Esc键重启键盘即可。

89 |

90 |

查看72套件

91 |
92 |
93 |
94 |
95 |
96 |
97 |

Keyboard Fireware Editor v2.0, License to Diyer.so

98 |
99 |
100 | 101 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /views/epbt75.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Keyboard Editor 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 44 | 67 | 68 | 69 | 70 |
71 |
72 | 75 |
76 |
77 | 78 | 79 |
80 |

81 | To view this page ensure that Adobe Flash Player version 82 | 11.1.0 or greater is installed. 83 |

84 |
85 | 86 | 87 |
88 |

配列1: WKL(Winkeyless) , 配列2: WK(Winkey)

89 |

刷机方式:按下键盘PCB背部的刷机按钮,此时键盘会识别为U盘,点击编译固件后,将bin覆盖U盘中的固件然后按Esc键重启键盘即可。

90 |

91 |

购买75套件

92 |
93 |
94 |
95 |
96 |
97 |
98 |

Keyboard Fireware Editor v2.0, License to EnjoyPBT

99 |
100 |
101 | 102 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /views/error.ejs: -------------------------------------------------------------------------------- 1 |

<%= message %>

2 |

<%= error.status %>

3 |
<%= error.stack %>
4 | -------------------------------------------------------------------------------- /views/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%= title %> 5 | 6 | 7 | 8 |

<%= title %>

9 |

Welcome to <%= title %>

10 | 11 | 12 | -------------------------------------------------------------------------------- /views/index2.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Keyboard Editor 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 44 | 67 | 68 | 69 | 70 |
71 |
72 | 75 |
76 |
77 | 78 | 79 |
80 |

81 | To view this page ensure that Adobe Flash Player version 82 | 11.1.0 or greater is installed. 83 |

84 |
85 | 86 | 87 |
88 | 91 |

Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.

92 |

Use the sticky footer with a fixed navbar if need be, too.

93 |
94 | 95 |
96 |
97 |

Keyboard Fireware Editor v2.0, License to EnjoyPBT

98 |
99 |
100 | 101 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /views/kb68.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Keyboard Editor 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 44 | 67 | 68 | 69 | 70 |
71 |
72 | 75 |
76 |
77 | 78 | 79 |
80 |

81 | To view this page ensure that Adobe Flash Player version 82 | 11.1.0 or greater is installed. 83 |

84 |
85 | 86 | 87 |
88 |

刷机方式:按下键盘PCB背部的刷机按钮,此时键盘会识别为U盘,点击编译固件后,将bin覆盖U盘中的固件然后按Esc键重启键盘即可。

89 |

90 |
91 |
92 |
93 |
94 |
95 |
96 |

TADA68 Keyboard Fireware Editor v2.2

97 |
98 |
99 | 100 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /views/keyboard.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 14 | Keyboard Web 15 | 16 | 17 | 23 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 51 | 74 | 75 | 76 |
77 |

78 | To view this page ensure that Adobe Flash Player version 79 | 11.1.0 or greater is installed. 80 |

81 |
82 | 83 | 84 | --------------------------------------------------------------------------------