UI-KeyboardLayout
view release on metacpan or search on metacpan
examples/klc2c.pl view on Meta::CPAN
One can freely choose to which configuration columns to resolve these combinations in the CharModifiers table. */
@@@modifiers@@@ { 0 , 0 }
};
/***************************************************************************\
* aModification[] - maps (combined) character modifier bitmaps to modification number: the ordinal of the column in subtables
* of aVkToWcharTable below.
*
* See kbd.h for a full description.
*
\***************************************************************************/
ALLOC_SECTION_LDATA MODIFIERS CharModifiers = {
&aVkToBits[0],
@@@num_column_descr@@@,
{
// Modification Num // ORed bitmap for pressed modifiers
// ================ // =================================
@@@column_descr@@@ }
};
/***************************************************************************\
*
* aVkToWch2[] - Virtual Key to WCHAR translation for VK codes with 2 shift states
* aVkToWch3[] - Virtual Key to WCHAR translation for VK codes with 3 shift states
* ...
*
* The order of scanning these subtable is defined in aVkToWcharTable. The VK codes are scanned by lookup in this null-terminated table.
* The result gives WCHAR characters for different useful combinations of modifiers.
*
* By convention, a row with dead chars for the previous row is started with VK-code 0xff.
*
* Special values for Attributes (column 2)
* CAPLOK bit - CAPS-LOCK affect the columns for bitmaps 0 and 1 (KBDSHIFT) like flipping SHIFT
* CAPLOKALTGR bit - Same for the case when both KBDALT and KBDCONTROL bits set in the bitmap.
*
* Special values for the output characters:
* WCH_NONE - No character
* WCH_DEAD - Dead Key (prefix key); the next line has the id of this deadkey (in the same column).
* WCH_LGTR - Ligature (generates 1 or more codepoints). This_VK + modifiers_position_id
* should be looked up in the ligature table below.
*
\***************************************************************************/
@@@extralendefs@@@
@@@sublayouts@@@
ALLOC_SECTION_LDATA VK_TO_WCHAR_TABLE aVkToWcharTable[] = {
@@@join_sublayouts@@@ { NULL, 0, 0 },
};
/***************************************************************************\
* aKeyNames[], aKeyNamesExt[], aKeyNamesDead[] - used to map a Scancode to Key Name via GetKeyNameText(); null-terminated.
*
* If the name is not found in the first two tables,
* then it is deduced from the character/deadkey this key produces in the unshifted position (as MapVirtualKeyEx()).
* In particular, the special-case in the latter function covers VK_A to VK_Z!
*
* As a corollary, the third table needs only to contain dead keys in the unshifted positions, and only
* at positions not present in the first two tables.
\***************************************************************************/
@@@KEYNAME@@@
@@@KEYNAME_EXT@@@
@@@KEYNAME_DEAD@@@
@@@deadkeys@@@
@@@ligatures@@@
PKBDTABLES KbdLayerDescriptor(VOID)
{
return &KbdTables;
}
__DATA__
LIBRARY @@@mod_name@@@
EXPORTS
KbdLayerDescriptor @1
__DATA__
#include "winver.h"
#include "winnt.h"
1 VERSIONINFO // https://learn.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource
FILEVERSION @@@version1@@@,@@@version2@@@,@@@vUIKL@@@,@@@myversion1000@@@
PRODUCTVERSION @@@version1@@@,@@@version2@@@,@@@vUIKL@@@,@@@myversion1000@@@
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x40004L
FILETYPE VFT_DLL
FILESUBTYPE VFT2_DRV_KEYBOARD
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004B0" // VER_VERSION_UNICODE_LANG: LANG_NEUTRAL/SUBLANG_NEUTRAL, Unicode CP
BEGIN
VALUE "CompanyName", "@@@q_company@@@\0"
VALUE "FileDescription", "@@@q_mod_descr@@@\0"
VALUE "FileVersion", "@@@version1@@@, @@@version2@@@, @@@vUIKL@@@, @@@myversion1000@@@\0"
VALUE "InternalName", "@@@mod_name@@@ (@@@version1@@@.@@@version2@@@)\0"
VALUE "ProductName","Created by @@@myversion@@@\0"
VALUE "Release Information","Created by @@@myversion@@@\0"
VALUE "LegalCopyright", "@@@q_copyright@@@\0"
VALUE "OriginalFilename","@@@mod_name@@@\0"
VALUE "ProductVersion", "@@@version1@@@, @@@version2@@@, @@@vUIKL@@@, @@@myversion1000@@@\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0000, 0x04B0 // As VER_VERSION_UNICODE_LANG
END
END
STRINGTABLE DISCARDABLE
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
BEGIN
1200 "@@@q_localename@@@"
END
( run in 1.086 second using v1.01-cache-2.11-cpan-df04353d9ac )