View Issue Details

IDProjectCategoryView StatusLast Update
0000535fileGeneralpublic2024-06-19 16:26
Reportersrl295 Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Fixed in VersionHEAD 
Summary0000535: Add support for Keyman keyboard files
DescriptionPlease find enclosed an update and test file that adds support for .kmx and .kmp files.
No MIME type yet but we are applying for one.
 
- https://help.keyman.com/developer/current-version/reference/file-types/kmx
- https://help.keyman.com/developer/current-version/reference/file-types/kmp
TagsNo tags attached.

Activities

srl295

2024-06-19 15:23

reporter  

0001-Add-Keyman-support-for-kmx-and-kmp-files.patch (6,235 bytes)   
From 5fbd48a1031cf227a0265cb90fb9bc02c43b7e8d Mon Sep 17 00:00:00 2001
From: "Steven R. Loomis" <srl295@gmail.com>
Date: Thu, 23 May 2024 10:04:13 -0500
Subject: [PATCH] Add Keyman support for kmx and kmp files

- https://help.keyman.com/developer/current-version/reference/file-types/kmx
- https://help.keyman.com/developer/current-version/reference/file-types/kmp

Co-authored-by: Marc Durdin <marc@durdin.net>
---
 magic/Magdir/archive    |   9 +++++++++
 magic/Magdir/keyman     |   8 ++++++++
 magic/Makefile.am       |   1 +
 tests/keyman-0.result   |   1 +
 tests/keyman-0.testfile | Bin 0 -> 1494 bytes
 tests/keyman-1.result   |   1 +
 tests/keyman-1.testfile | Bin 0 -> 378 bytes
 tests/keyman-2.result   |   1 +
 tests/keyman-2.testfile | Bin 0 -> 1092 bytes
 9 files changed, 21 insertions(+)
 create mode 100644 magic/Magdir/keyman
 create mode 100644 tests/keyman-0.result
 create mode 100644 tests/keyman-0.testfile
 create mode 100644 tests/keyman-1.result
 create mode 100644 tests/keyman-1.testfile
 create mode 100644 tests/keyman-2.result
 create mode 100644 tests/keyman-2.testfile

diff --git a/magic/Magdir/archive b/magic/Magdir/archive
index 9343bb95..5880ffc4 100644
--- a/magic/Magdir/archive
+++ b/magic/Magdir/archive
@@ -1822,6 +1822,15 @@
 !:mime	application/vnd.android.package-archive
 !:ext	apk

+# Keyman Compiled Package File (keyman.com)
+# https://help.keyman.com/developer/current-version/reference/file-types/kmp
+# Find start of central directory
+>>>(-6.l)   string   PK\001\002
+# Scan central directory for string 'kmp.json', will suffice for a
+# package containing about 150 files
+>>>>(-6.l)   search/9000   kmp.json   Keyman Compiled Package File
+!:ext kmp
+
 # Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
 0	string		PK\005\006	Zip archive data (empty)
 !:mime application/zip
diff --git a/magic/Magdir/keyman b/magic/Magdir/keyman
new file mode 100644
index 00000000..5b89b6cb
--- /dev/null
+++ b/magic/Magdir/keyman
@@ -0,0 +1,8 @@
+# Keyman - keyman.com
+
+# https://help.keyman.com/developer/current-version/reference/file-types/kmx
+0   string/b  KXTS    Keyman Compiled Keyboard File
+>4   lelong     x version 0x%x
+>>48  lelong &32   KMX+ Data
+!:ext kmx
+
diff --git a/magic/Makefile.am b/magic/Makefile.am
index 270c7fc2..8744f895 100644
--- a/magic/Makefile.am
+++ b/magic/Makefile.am
@@ -157,6 +157,7 @@ $(MAGIC_FRAGMENT_DIR)/karma \
 $(MAGIC_FRAGMENT_DIR)/kde \
 $(MAGIC_FRAGMENT_DIR)/keepass \
 $(MAGIC_FRAGMENT_DIR)/kerberos \
+$(MAGIC_FRAGMENT_DIR)/keyman \
 $(MAGIC_FRAGMENT_DIR)/kicad \
 $(MAGIC_FRAGMENT_DIR)/kml \
 $(MAGIC_FRAGMENT_DIR)/lammps \
diff --git a/tests/keyman-0.result b/tests/keyman-0.result
new file mode 100644
index 00000000..b092464b
--- /dev/null
+++ b/tests/keyman-0.result
@@ -0,0 +1 @@
+Keyman Compiled Keyboard File version 0x1100 KMX+ Data
diff --git a/tests/keyman-0.testfile b/tests/keyman-0.testfile
new file mode 100644
index 0000000000000000000000000000000000000000..558a7b2d464c9dd6070c034979812173d6dfaddc
GIT binary patch
literal 1494
zcmZvcId2p}5QU4|7_f|F$%tqJiz6_yu>o5GiThe^FUF9KcSjg`R%@nb4J#oc0z||Q
zARtBrL<HO+0f9p#j)0Jem;iWhRK0#6N-DjttE+o^db_GRQ=78Q*0mK*t6fjJ{&uVQ
zILZe=?;5jp9=Hu1aJ~;6a()Kg=KKm;v($nWR<&7cU_5FQw#!D~yKT~jEwRiNYz{gM
zYFWLESee1B5v*yHd(2~(7IMu(S}$gxJkNS)nx##S=hIHepjpz%_pgH92*o{WtDZc9
zHq#<`3JpabmZ0sB7T<9Ji%A}SLb(sWDc%jR+;eHA8PdCPo{7d7j!;^!tIBrYXsrkT
zm$MObOp9|-bsy!54B|N$8ud7iikn@wv1PPz;XT58h4%?h2u}(h5<V<^MEI!iG2!FF
zCxqksW9XE`PYYLt&j_CtJ|}!$_=507;Y-3(!ZqQ`!qdW6g!%rWU5x;}Cj3J9r7-Ix
z+Up3=H^Og)-#PQ$e3JNQ;V;5pg;^WCYp#vXH?zTW7^9&ax)x*1<6Gt%Wo>PN#yMbV
zthIg+<LnizxgjX)l<RxoteZ{nxR&*}6@xy+?!akx;jFC(aISj@=YEgjJlhjE^WVd{
zH@}^E-{3ss57%E%=J#NK&iA<vxc=Q~#*KCHZ_k=VPYUQkX4gRrR<RwHmpv(kE`l1i
z6SH&H#QaV4sWvj%)A0Qm8Dh7Pm4iDN1yEM@KmJ-#W-_ad8GPyB^Fgx%9}nVhV~65x
JMq{Va@gE|hcohHu

literal 0
HcmV?d00001

diff --git a/tests/keyman-1.result b/tests/keyman-1.result
new file mode 100644
index 00000000..aa270a12
--- /dev/null
+++ b/tests/keyman-1.result
@@ -0,0 +1 @@
+Keyman Compiled Keyboard File version 0x600
diff --git a/tests/keyman-1.testfile b/tests/keyman-1.testfile
new file mode 100644
index 0000000000000000000000000000000000000000..9a5e835e04af55f0c3f11b84877e9e2d3df8e107
GIT binary patch
literal 378
zcmYL^u}%U(6h$wQfQ>>Wjm1{mL6(@9*r5rr*hqsWw7a0mCd+C-4DtmO#4j**{(v2g
zCEs90M{D5^jAu3jyyVQ>d*6GLOxU~aswA1s=TcO`9u!foTiiuLLm_uHbAu-&3z$O<
z-r)_(@C6@m2rKx8Dy-qh=|ApY2tW#TuU8EfDa(C8ekM<K$TU$(>Z_wm-KdQ|S0mr_
z^}^;zV<mdbcbjU`zozRk8<E==FW^dd=tO-c2W&~F{KbcD9U!dT??t#H*N$mDfX$9w
Ymg1jWR&m)gehM+(m?CE%tQ&yz4<x}WLjV8(

literal 0
HcmV?d00001

diff --git a/tests/keyman-2.result b/tests/keyman-2.result
new file mode 100644
index 00000000..a32b7f38
--- /dev/null
+++ b/tests/keyman-2.result
@@ -0,0 +1 @@
+Keyman Compiled Package File
diff --git a/tests/keyman-2.testfile b/tests/keyman-2.testfile
new file mode 100644
index 0000000000000000000000000000000000000000..9f4f8a691d6746cf9f6349529b66976090d69e9d
GIT binary patch
literal 1092
zcmWIWW@h1HU|`^2xKXk!!d}wi_%0yNhLM3m5=dvq8yFbG$H(WD=H$d@r&cEACl;mX
zW#?A-_8amsI!d(4vwDekdM%BP<eJLVsnNpLDYp7Xf~vMk-U5NnIGN*&Q}h-rC}P|v
ztNq${-^t(V@9R%)Y5zM<=+ei+?JY^av;==iJu%2%Vjp@qf$iIdW}P_?7(90zkPIql
z)?V_E_56k9FFKoZZ{3=ewYt^q)0v#vlc%%JyEd!%)2x|SBD{<C$rQ1chK9TQ*0{P}
z4!h7cXZ_TeNsjTJsqdy`zS;1)ZN1~Jg^ZI|b4Iq?u9WGn`x$KDHd{Ub#lze8J<Boy
zdNzd_6a+vI=N9N?73b$o4La?2*g#;<cWs^dQJjmWaQA0FWD-(n+_6B*sB`v=AA&bM
zT|%DTk9_`6B}=#^KkodwGv|KoaN?MK>Pg50>yj4fJN!MD`B(7<3w8at_4%Xg?@5=u
z1S<W#PldXD<=C?KW6k?lV$AEdC9K&bGp{E#m)l3~$^yqOo4{Ll7YYRmXI(3aJha@6
zYj3bp0rN_0{)MNs&OTC!&$#zhV#~eU3p!I(n)Eg-X?*|NQQ$<=X9l<bK`!pWZI@IH
z+&8s;xg{pvd-gip=bKkzlb=7^vu1kN{5<aEQo{brYm`1K{JHrqTxglfvJ-k9+?S^O
zSNUVs@QYnJ%6{KooBTG7Z@wabE4T|CBwh&JG?;L^Q8?}5pG7h&WNL%IPhWVhvxobG
zWk)}+kB`lX8OD=$+?#0e_R=f%&FS_%J6F{+qK2&6qB30`V94$TVs>cAX6B{kPBiof
z25jqhkDvV0mWOdoJbdWMLM=zFR-u&#gciQY=sTiPrgePctorja)k+r3{`%+c-tzKF
zwstnHKOD{FTlT){+0*SRu|(a5htK$SsMr>s=9>2hcBPvzFO=LdYs*&G0u9disZVDI
zE-SyVZDnEEm!y4$@v;}KFKAQ-b0~H#GH|{v#@jbv_QoXlIl=SaSww|i_4~A6J$lXb
zobJVJhvNjl%#7h(_ioLT|8~zl*mNF^JSiX2ZF`gZr032odGlXKl)Gkm*y%QDa^;#@
zyn1%}i=o<6@m+hlHXeQaFLnEz8}IK;|M_tH<n|fn4*%Y?Ro0vRZa?@eF3z`XrpCwT
z6->drDLN{%G)zNR|FYt#V+inOWD;S(o%?{Hh6HftMRa4((=@`2k3c3Yg`?|2k1vES
bZzhN?VC)5Wv$BCCn1OH;kgfq{8wLgd68pF;

literal 0
HcmV?d00001

--
2.34.1

christos

2024-06-19 16:26

manager   ~0004056

Added, thanks

Issue History

Date Modified Username Field Change
2024-06-19 15:23 srl295 New Issue
2024-06-19 15:23 srl295 File Added: 0001-Add-Keyman-support-for-kmx-and-kmp-files.patch
2024-06-19 16:26 christos Assigned To => christos
2024-06-19 16:26 christos Status new => assigned
2024-06-19 16:26 christos Status assigned => resolved
2024-06-19 16:26 christos Resolution open => fixed
2024-06-19 16:26 christos Fixed in Version => HEAD
2024-06-19 16:26 christos Note Added: 0004056