This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; | |
BlobBuilder = window.MozBlobBuilder || window.WebKitBlobBuilder || window.BlobBuilder; | |
Object.size = function(obj) { | |
var size = 0, key; | |
for (key in obj) { | |
if (obj.hasOwnProperty(key)) size++; | |
} | |
return size; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; | |
BlobBuilder = window.MozBlobBuilder || window.WebKitBlobBuilder || window.BlobBuilder; | |
Object.size = function(obj) { | |
var size = 0, key; | |
for (key in obj) { | |
if (obj.hasOwnProperty(key)) size++; | |
} | |
return size; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; | |
BlobBuilder = window.MozBlobBuilder || window.WebKitBlobBuilder || window.BlobBuilder; | |
Object.size = function(obj) { | |
var size = 0, key; | |
for (key in obj) { | |
if (obj.hasOwnProperty(key)) size++; | |
} | |
return size; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Сanvas-based OpenStreetMap</title> | |
<link rel="stylesheet" href="leaflet/leaflet.css" /> | |
<!--[if lte IE 8]><link rel="stylesheet" href="leaflet/leaflet.ie.css" /><![endif]--> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// xkbcat: Logs X11 keypresses, globally. | |
#include <X11/XKBlib.h> | |
#include <X11/extensions/XInput2.h> | |
#include <xkbcommon/xkbcommon.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// xkbcat: Logs X11 keypresses, globally. | |
#include <X11/XKBlib.h> | |
#include <X11/extensions/XInput2.h> | |
#include <xkbcommon/xkbcommon.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size_t TTYInputSequenceParser::TryParseAsKittyEscapeSequence(const char *s, size_t l) | |
{ | |
// kovidgoyal's kitty keyboard protocol (progressive enhancement flags 15) support | |
// CSI [ XXX : XXX : XXX ; XXX : XXX [u~ABCDEFHPQRS] | |
// some parts sometimes ommitted, see docs | |
// https://sw.kovidgoyal.net/kitty/keyboard-protocol/ | |
// todo: enhanced key flag now set for essential keys only, should be set for more ones | |
// todo: add more keys. all needed by far2l seem to be here, but kitty supports much more |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (_kitty_kb_flags) { | |
// References: | |
// https://sw.kovidgoyal.net/kitty/keyboard-protocol/ | |
// https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes | |
char buffer[64] = {0}; | |
const bool ctrl = (KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED)) != 0; | |
const bool alt = (KeyEvent.dwControlKeyState & (RIGHT_ALT_PRESSED|LEFT_ALT_PRESSED)) != 0; |