forked from ijprest/keyboard-layout-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kb.html
1410 lines (1307 loc) · 75.6 KB
/
kb.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--***********************************************
KEYBOARD LAYOUT EDITOR
Copyright (C) 2013-2018 Ian Prest
All rights reserved.
************************************************-->
<!DOCTYPE html>
<html ng-app="kbApp">
<head>
<title>Keyboard Layout Editor</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/hint.min.css">
<link rel="stylesheet" type="text/css" href="css/colorpicker.min.css">
<link rel="stylesheet" type="text/css" href="css/kb.css">
<link rel="stylesheet" type="text/css" href="css/kbd-webfont.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/ace.js"></script>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript" src="js/angular-sanitize.min.js"></script>
<script type="text/javascript" src="js/angular-cookies.min.js"></script>
<script type="text/javascript" src="js/ui-ace.min.js"></script>
<script type="text/javascript" src="js/ui-utils.min.js"></script>
<script type="text/javascript" src="js/ui-bootstrap-tpls-0.12.0.min.js"></script>
<script type="text/javascript" src="js/crypto-js.js"></script>
<script type="text/javascript" src="js/marked.min.js"></script>
<script type="text/javascript" src="js/FileSaver.min.js"></script>
<script type="text/javascript" src="js/ng-file-upload.min.js"></script>
<script type="text/javascript" src="js/draganddrop.js"></script>
<script type="text/javascript" src="js/bootstrap-colorpicker-module.min.js"></script>
<script type="text/javascript" src="js/doT.min.js"></script>
<script type="text/javascript" src="js/urlon.js"></script>
<script type="text/javascript" src="js/cssparser.min.js"></script><script type="text/javascript">$cssParser = cssparser;</script>
<script type="text/javascript" src="js/color.js"></script>
<script type="text/javascript" src="js/jsonl.min.js"></script>
<script type="text/javascript" src="js/html2canvas.min.js"></script>
<script type="text/javascript" src="extensions.js"></script>
<script type="text/javascript" src="render.js"></script>
<script type="text/javascript" src="serial.js"></script>
<script type="text/javascript" src="kb.js"></script>
</head>
<body ng-controller="kbCtrl"
ng-mouseup="selectRelease($event)"
ng-mousemove="selectMove($event)"
ui-keydown="{'shift-191' : 'showHelp($event)',
112 : 'showHelp($event)',
118 : 'showOptions($event)',
'ctrl-83' : 'save($event)' }">
<style type="text/css" ng-bind-html="customStyles"></style>
<div id="wrap">
<div id='body_all'><!-- this wrapper is to allow the magic that prints just the summary -->
<!--***********************************************
Nav Bar / Header
************************************************-->
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="navbar-header">
<!-- Hamburger menu, when width is too small -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Main branding icon/title -->
<a class="navbar-brand" href="#"><i class="fa fa-keyboard-o"></i> keyboard-layout-editor.com</a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<!-- Left-aligned NavBar buttons -->
<ul class="nav navbar-nav">
<!-- Presets dropdown -->
<li class="dropdown" dropdown>
<a class="dropdown-toggle" dropdown-toggle><i class="fa fa-keyboard-o"></i> Preset <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-header">Standard Layouts:</li>
<li ng-repeat="v in layouts"><a ng-click="loadPreset(v.data)" href="#">{{v.name}}</a></li>
<li class="divider"></li>
<li class="dropdown-header">Complex Samples:</li>
<li ng-repeat="(k,v) in samples"><a ng-click="loadSample(v)" href="#">{{k}}</a></li>
</ul>
</li>
<!-- Color swatches dropdown -->
<li class="dropdown" dropdown>
<a class="dropdown-toggle" dropdown-toggle><i class="fa fa-th"></i> Color Swatches <b class="caret"></b></a>
<ul class="dropdown-menu">
<li ng-repeat="pal in palettes"><a ng-click="loadPalette(pal)" href="#">{{pal.name}}</a></li>
<li class="divider"></li>
<li><a ng-click="makePaletteFromKeys()" href="#">Current key colors</a></li>
</ul>
</li>
<!-- Character Picker dropdown -->
<li class="dropdown" dropdown>
<a class="dropdown-toggle" dropdown-toggle><i class="fa fa-font"></i> Character Picker <b class="caret"></b></a>
<ul class="dropdown-menu">
<li ng-repeat="picker in pickers"><a ng-click="loadCharacterPicker(picker)" href="#">{{picker.name}}</a></li>
<li class="divider"></li>
<li><a ng-click="loadCharacterPicker(null)" href="#">User-Defined Glyphs</a></li>
</ul>
</li>
</ul>
<!-- Right-aligned NavBar buttons -->
<ul class="nav navbar-nav navbar-right" style="">
<!-- Options button -->
<li><a href="#" ng-click="showOptions()"><i class="fa fa-cog"></i> Options</a></li>
<!-- Permalink button -->
<li><a ng-href="{{getPermalink()}}" target="_blank" ng-click="dirty = false"><i class="fa fa-link"></i> Permalink</a></li>
<!-- User button -->
<li ng-hide="user"><a href="#" ng-click="userLogin()"><i class="fa fa-github"></i> Sign in with GitHub</a></li>
<li ng-hide="!user" class="dropdown" dropdown ng-cloak>
<a class="dropdown-toggle" dropdown-toggle><span ng-bind-html="user.avatar"></span> {{user.name}} <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a ng-click="showSavedLayouts(false)" href="#"><i class="fa fa-folder-open-o"></i> My Layouts</a></li>
<li><a ng-click="showSavedLayouts(true)" href="#"><i class="fa fa-star-o"></i> Starred Layouts</a></li>
<li class="divider"></li>
<li><a href="https://github.com/settings/connections/applications/{{githubClientId}}" target="_blank"><i class="fa fa-key"></i> Manage GitHub Permissions</a></li>
<li><a ng-click="userLogout()" href="#"><i class="fa fa-sign-out"></i> Log out</a></li>
</ul>
</li>
</ul>
</div>
</nav>
<div class="body" ng-cloak>
<!--***********************************************
Main Toolbar
************************************************-->
<!-- Add Key button w/dropdown -->
<div class="btn-group" dropdown>
<button type="button" class="btn btn-primary" ng-click="addKey()"><i class="fa fa-plus-circle"></i> Add Key</button>
<button type="button" class="btn btn-primary dropdown-toggle" dropdown-toggle>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a ng-click="addKeys(1)">Add 1 Key</a></li>
<li><a ng-click="addKeys(5)">Add 5 Keys</a></li>
<li><a ng-click="addKeys(10)">Add 10 Keys</a></li>
<li><a ng-click="addKeys(25)">Add 25 Keys</a></li>
<li class="divider" ng-class="{hidden: !specialKeys}"></li>
<li ng-repeat="(k,v) in specialKeys"><a ng-click="addKey(v)">{{k}}</a></li>
</ul>
</div>
<!-- Delete Key button -->
<div class="btn-group">
<button type="button" class="btn btn-danger" ng-class="{disabled:selectedKeys.length<1}" ng-click="deleteKeys()">
<i class="fa fa-minus-circle"></i> Delete Keys
</button>
</div>
<!-- Undo/Redo button group -->
<div class="btn-group">
<button type="button" class="btn btn-default" ng-class="{disabled:!canUndo()}" ng-click="undo()"><i class="fa fa-undo"></i> Undo</button>
<button type="button" class="btn btn-default" ng-class="{disabled:!canRedo()}" ng-click="redo()"><i class="fa fa-repeat"></i> Redo</button>
</div>
<!-- Clipboard button group -->
<div class="btn-group">
<button type="button" class="btn btn-default" ng-class="{disabled:!canCopy()}" ng-click="cut()"><i class="fa fa-cut"></i> Cut</button>
<button type="button" class="btn btn-default" ng-class="{disabled:!canCopy()}" ng-click="copy()"><i class="fa fa-copy"></i> Copy</button>
<button type="button" class="btn btn-default" ng-class="{disabled:!canPaste()}" ng-click="paste()"><i class="fa fa-paste"></i> Paste</button>
</div>
<div class="btn-group" ng-hide="!user || !user.id || !currentGist || isStarred">
<button type="button" class="btn btn-default" ng-click="setGistStar(currentGist, true)" ><i class="fa fa-star-o"></i> Star</button>
</div>
<div class="btn-group" ng-hide="!user || !user.id || !currentGist || !isStarred">
<button type="button" class="btn btn-default" ng-click="setGistStar(currentGist, false)" ><i class="fa fa-star"></i> Unstar</button>
</div>
<!-- Save button (right aligned) -->
<div class="btn-group pull-right" ng-hide="user && user.id">
<button type="button" class="btn btn-success hint--bottom hint--no-animate disabled" data-hint="Sign in to save your layouts.">
<i class="fa fa-save"></i> Save
</button>
</div>
<div class="btn-group pull-right" ng-hide="!user || !user.id">
<button type="button" class="btn btn-success" ng-class="{disabled:!canSave()}" ng-click="save()">
<i class="fa fa-save"></i> Save
</button>
</div>
<div class="btn-group pull-right" style="margin-right: 4px;" dropdown>
<button type="button" class="btn btn-success dropdown-toggle" dropdown-toggle><i class="fa fa-download"></i> Download <span class="caret"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a ng-click="downloadSvg()">Download SVG (Experimental)</a></li>
<li><a ng-click="downloadPng()">Download PNG (Experimental)</a></li>
<li><a ng-click="downloadJpg()">Download JPG (Experimental)</a></li>
<li><a ng-click="downloadThumb()">Download Thumbnail (PNG) (Experimental)</a></li>
<li class="divider"></li>
<li><a ng-click="downloadJson()">Download JSON</a></li>
</ul>
</div>
<!--***********************************************
Main Keyboard Preview/Editor area
************************************************-->
<div id="keyboard" ng-cloak tabindex="0"
ui-keydown="{ left:'moveKeys(-moveStep,0,$event)',
right:'moveKeys(moveStep,0,$event)',
up:'moveKeys(0,-moveStep,$event)',
down:'moveKeys(0,moveStep,$event)',
'shift-left':'sizeKeys(-sizeStep,0,$event)',
'shift-right':'sizeKeys(sizeStep,0,$event)',
'shift-up':'sizeKeys(0,-sizeStep,$event)',
'shift-down':'sizeKeys(0,sizeStep,$event)',
'pageup':'rotateKeys(-rotateStep,$event)',
'pagedown':'rotateKeys(rotateStep,$event)',
'ctrl-left':'moveCenterKeys(-moveStep,0,$event)',
'ctrl-right':'moveCenterKeys(moveStep,0,$event)',
'ctrl-up':'moveCenterKeys(0,-moveStep,$event)',
'ctrl-down':'moveCenterKeys(0,moveStep,$event)',
delete:'deleteKeys()',
insert:'addKey()',
74: 'prevKey($event)',
75: 'nextKey($event)',
'shift-74': 'prevKey($event)',
'shift-75': 'nextKey($event)',
113: 'focusEditor()',
esc: 'unselectAll()',
'ctrl-65': 'selectAll($event)',
'ctrl-67 ctrl-45': 'copy($event)',
'ctrl-88 shift-46': 'cut($event)',
'ctrl-86 shift-45': 'paste($event)',
'ctrl-90' : 'undo()',
'ctrl-shift-90' : 'redo()',
'ctrl-89' : 'redo()' }"
ng-mousedown="selectClick($event)"
ngf-drop="true" ngf-change="uploadJson($files, $event)" ngf-drag-over-class="drag-over">
<div id='keyboard-bg'
ng-attr-style="height:{{kbHeight}}px; width:{{kbWidth}}px; background-color:{{keyboard.meta.backcolor}}; border-radius: {{keyboard.meta.radii || '6px'}}; {{keyboard.meta.background.style}}">
<div ng-repeat="key in keys()"
class="key {{key.profile}}"
ng-mouseover="hoveredKey=key"
ng-mouseleave="hoveredKey=null"
ng-class="{hover: hoveredKey==key, selected: selectedKeys.indexOf(key)>=0, HOMING:key.nub}"
ng-bind-html="key.html">
</div>
</div>
<div style="line-height:1.2em; padding:3px 5px;" ng-hide="!keyboard.meta.name && !keyboard.meta.author">
<a href="#" ng-click="previewNotes()">{{keyboard.meta.name}}<br/><i>{{keyboard.meta.author}}</i></a>
</div>
<div style='clear:both'></div>
{{calcKbHeight()}}
</div>
<div id="selectionRectangle" ng-style="{display:selRect.display, left:selRect.l+'px', width:selRect.w+'px', top:selRect.t+'px', height:selRect.h+'px'}"></div>
<div id="rotationCrosshairs" ng-style="{display:multi.crosshairs, left:(keyboardLeft()+multi.crosshairs_x-1)+'px', top:(keyboardTop()+multi.crosshairs_y-3)+'px'}"><i class="fa fa-crosshairs"></i></div>
<!--***********************************************
Editor controls
************************************************-->
<!-- Tab strip -->
<ul class="nav nav-tabs" ng-cloak>
<li ng-class="{active:selTab==0}"><a ng-click="selTab=0" data-toggle="tab"><i class="fa fa-edit"></i> Properties</a></li>
<li ng-class="{active:selTab==1}"><a ng-click="selTab=1" data-toggle="tab"><i class="fa fa-keyboard-o"></i> Keyboard Properties</a></li>
<li ng-class="{active:selTab==3}"><a ng-click="selTab=3" data-toggle="tab"><i class="fa fa-file-text-o"></i> Custom Styles</a></li>
<li ng-class="{active:selTab==2}"><a ng-click="selTab=2" data-toggle="tab"><i class="fa fa-code"></i> Raw data</a></li>
<li ng-class="{active:selTab==4}"><a ng-click="selTab=4" data-toggle="tab"><i class="fa fa-file-text-o"></i> Summary</a></li>
<li ng-class="{active:selTab==5}"><a ng-click="selTab=5" data-toggle="tab"><i class="fa fa-wrench"></i> Tools</a></li>
</ul>
<div id="tab-content" class='col-md-12 col-lg-12 row' ui-keydown="{esc:'focusKb()'}" ng-cloak>
<!-- PROPERTIES EDITOR -->
<div id="properties" ng-class="{hidden:selTab!=0}">
<form class="form-horizontal col-sm-8 col-md-5 col-lg-5">
<!-- Top Legend -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="labeleditor0">Top Legend:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline">
<kbd-label-editor label-index="0" hint-text="Specify a top-left legend for the keycap."></kbd-label-editor>
<kbd-label-editor label-index="1" hint-text="Specify a top-center legend for the keycap."></kbd-label-editor>
<kbd-label-editor label-index="2" hint-text="Specify a top-right legend for the keycap."></kbd-label-editor>
</div>
</div>
</div>
<!-- Center Legend -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="labeleditor3">Center Legend:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline">
<kbd-label-editor label-index="3" hint-text="Specify a center-left legend for the keycap."></kbd-label-editor>
<kbd-label-editor label-index="4" hint-text="Specify a center legend for the keycap."></kbd-label-editor>
<kbd-label-editor label-index="5" hint-text="Specify a center-right legend for the keycap."></kbd-label-editor>
</div>
</div>
</div>
<!-- Bottom Legend -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="labeleditor6">Bottom Legend:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline">
<kbd-label-editor label-index="6" hint-text="Specify a bottom-left legend for the keycap."></kbd-label-editor>
<kbd-label-editor label-index="7" hint-text="Specify a bottom-center legend for the keycap."></kbd-label-editor>
<kbd-label-editor label-index="8" hint-text="Specify a bottom-right legend for the keycap."></kbd-label-editor>
</div>
</div>
</div>
<!-- Side-Print Legend -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="labeleditor9">Front Legend:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline">
<kbd-label-editor label-index="9" hint-text="Specify a front-left legend for the keycap."></kbd-label-editor>
<kbd-label-editor label-index="10" hint-text="Specify a front-center legend for the keycap."></kbd-label-editor>
<kbd-label-editor label-index="11" hint-text="Specify a front-right legend for the keycap."></kbd-label-editor>
</div>
</div>
</div>
<!-- Legend Size -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="textSize-editor">Legend Size:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline hint--top hint--rounded"
data-hint="Specify the size for the keycap legends. Setting this value will change the size of all legends, and will replace any existing size overrides.">
<div class="form-group form-group-sm">
<input id="textSize-editor" class="form-control input-sm" style="max-width:64px" size="6" type='number' min="1" max="9"
ng-model="multi.default.textSize"
ng-change="updateMulti('textSize',-1)"
ng-blur="validateMulti('textSize',-1)"
ng-disabled="selectedKeys.length<1">
</div>
</div>
</div>
</div>
<!-- Legend Color -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="textcoloreditor">Legend Color:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline">
<kbd-color-picker picker-id="textcoloreditor" picker-position="top"
ng-model="multi.default.textColor"
ng-change="updateMulti('textColor',-1)"
ng-blur="validateMulti('textColor',-1)"
ng-disabled="selectedKeys.length<1"
hint-text="Specify the color to use for the legend text on the selected keycaps. Setting this value will change the color of all legends, and will replace any existing color overrides."
ui-on-Drop="dropSwatch($data,$event,true,-1)" drop-channel="dragColor"></kbd-color-picker>
<div class="form-group form-group-sm color-name">{{colorName(multi.default.textColor)}}</div>
</div>
<!-- Swap Colors Button -->
<div>
<div id="swap-colors"
class="hint--top hint--rounded"
data-hint="Swap the text and keycap colors.">
<button class="btn btn-default"
ng-click="swapColors()"
ng-disabled="selectedKeys.length<1 || multi.decal" >
<i class="fa fa-random"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Key Color -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="coloreditor">Key Color:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline">
<kbd-color-picker picker-id="coloreditor" picker-position="top"
ng-model="multi.color"
ng-change="updateMulti('color')"
ng-blur="validateMulti('color')"
ng-disabled="selectedKeys.length<1 || multi.decal"
hint-text="Specify the color to use for the background of the selected keycaps."
ui-on-Drop="dropSwatch($data,$event,false)" drop-channel="dragColor"></kbd-color-picker>
<div class="form-group form-group-sm color-name">{{colorName(multi.color)}}</div>
</div>
</div>
</div>
<!-- Width -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="width-editor">Width:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline hint--top hint--rounded"
data-hint="Specify the primary and secondary widths for the keycap. The secondary width is used to specify the size of non-rectangular or stepped keys.">
<kbd-multi-numbox field="width" size="6" min="0.5" max="24" step='{{sizeStep}}'></kbd-multi-numbox>
<div class="form-group form-group-sm"> / </div>
<kbd-multi-numbox field="width2" size="6" min="0.5" max="24" step='{{sizeStep}}' kbd-disable="multi.decal"></kbd-multi-numbox>
</div>
<!-- Swap Sizes Button -->
<div>
<div id="swap-sizes"
class="hint--top hint--rounded"
data-hint="Swap the primary & secondary sizes (affects legend positioning on oddly shaped keys).">
<button class="btn btn-default"
ng-click="swapSizes()"
ng-disabled="selectedKeys.length<1 || (multi.width == multi.width2 && multi.height == multi.height2) || multi.decal" >
<i class="fa fa-random"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Height -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="height-editor">Height:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline hint--top hint--rounded"
data-hint="Specify the primary and secondary heights for the keycap. The secondary height is used to specify the size of non-rectangular or stepped keys.">
<kbd-multi-numbox field="height" size="6" min="0.5" max="24" step='{{sizeStep}}'></kbd-multi-numbox>
<div class="form-group form-group-sm"> / </div>
<kbd-multi-numbox field="height2" size="6" min="0.5" max="24" step='{{sizeStep}}' kbd-disable="multi.decal"></kbd-multi-numbox>
</div>
</div>
</div>
<!-- X -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="x-editor">X:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline hint--top hint--rounded"
data-hint="Specify the X position of the keycap. An X-offset can also be specified to indicate how non-rectangular keys should be displayed.">
<kbd-multi-numbox field="x" size="6" min="0" max="36" step='{{moveStep}}'></kbd-multi-numbox>
<div class="form-group form-group-sm"> + </div>
<kbd-multi-numbox field="x2" size="6" min="-6" max="6" step='{{moveStep}}' kbd-disable="multi.decal"></kbd-multi-numbox>
</div>
</div>
</div>
<!-- Y -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="y-editor">Y:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline hint--top hint--rounded"
data-hint="Specify the Y position of the keycap. A Y-offset can also be specified to indicate how non-rectangular keys should be displayed.">
<kbd-multi-numbox field="y" size="6" min="0" max="36" step='{{moveStep}}'></kbd-multi-numbox>
<div class="form-group form-group-sm"> + </div>
<kbd-multi-numbox field="y2" size="6" min="-6" max="6" step='{{moveStep}}' kbd-disable="multi.decal"></kbd-multi-numbox>
</div>
</div>
</div>
<!-- Rotation -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="rotation_angle-editor">Rotation:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline hint--top hint--rounded"
data-hint="Specify the angle (in degrees) by which to rotate the keycaps, and the x & y coordinates of the center of rotation.">
<kbd-multi-numbox field="rotation_angle" size="3" min="-180" max="180" step='{{rotateStep}}'></kbd-multi-numbox>
<div class="form-group form-group-sm"> ° </div>
<kbd-multi-numbox field="rotation_x" size="6" min="0" max="36" step='{{moveStep}}'></kbd-multi-numbox>
<div class="form-group form-group-sm"> , </div>
<kbd-multi-numbox field="rotation_y" size="6" min="0" max="36" step='{{moveStep}}'></kbd-multi-numbox>
</div>
</div>
</div>
<!-- Profile / Row -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="profileeditor-search">Profile / Row:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline hint--top hint--rounded"
data-hint="Specify the profile and (optionally) the row-number of the selected keys, e.g., 'DCS R1', 'DSA', 'DSA SPACE', etc.
Supported profiles:
• SA, DSA, DCS, OEM, CHICKLET, FLAT
Supported rows:
• R1, R2, R3, R4, R5, SPACE">
<div class="form-group form-group-sm">
<input id="profileeditor-search" class="form-control input-sm" size="24" type='text' autocomplete="off"
ng-model="multi.profile"
ng-change="updateMulti('profile')"
ng-blur="validateMulti('profile')"
ng-disabled="selectedKeys.length<1 || multi.decal">
</div>
</div>
</div>
</div>
<!-- Keyswitch options-->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap" for="switcheditor">Switch:</label>
<div class="form-inline form-outdent col-md-9 col-lg-9">
<!-- Keyswitch mount style-->
<div class="hint--bottom hint--rounded" data-hint="Specify the mount style of switch for this key.">
<div class="btn-group btn-group-sm-form dropup" dropdown>
<button id="switcheditor" type="button" class="btn btn-default dropdown-toggle dropdown-fixedwidth" ng-disabled="selectedKeys.length<1 || multi.decal" dropdown-toggle>
<div>{{(multi.sm || meta.switchMount) ? switches[multi.sm || meta.switchMount].name : 'Mount N/A'}}</div>
<b class="caret"></b>
</button>
<ul class="dropdown-menu dropdown-select" role="menu">
<li ng-repeat="(k,v) in switches"><a ng-click="setMulti('sm',k)">{{v.name + (meta.switchMount===k ? ' (default)' : '')}}</a></li>
</ul>
</div>
</div>
<!-- Keyswitch brand-->
<div class="hint--bottom hint--rounded" data-hint="Specify the brand of key switch for this key.">
<div class="btn-group btn-group-sm-form dropup" dropdown>
<button type="button" class="btn btn-default dropdown-toggle dropdown-fixedwidth" dropdown-toggle ng-disabled="selectedKeys.length<1 || !(multi.sm || meta.switchMount) || multi.decal">
<div>{{(multi.sb || meta.switchBrand) ? switches[multi.sm || meta.switchMount].brands[multi.sb || meta.switchBrand].name : 'Brand N/A'}}</div>
<b class="caret"></b>
</button>
<ul class="dropdown-menu dropdown-select" role="menu">
<li ng-repeat="(k,v) in switches[multi.sm || meta.switchMount].brands"><a ng-click="setMulti('sb',k)">{{v.name + (meta.switchBrand===k ? ' (default)' : '')}}</a></li>
</ul>
</div>
</div>
<!-- Keyswitch type-->
<div class="hint--bottom hint--rounded" data-hint="Specify the type of key switch for this key.">
<div class="btn-group btn-group-sm-form dropup" dropdown>
<button type="button" class="btn btn-default dropdown-toggle dropdown-fixedwidth" dropdown-toggle ng-disabled="selectedKeys.length<1 || !(multi.sm || meta.switchMount) || !(multi.sb || meta.switchBrand) || multi.decal">
<div>{{(multi.st || meta.switchType) ? switches[multi.sm || meta.switchMount].brands[multi.sb || meta.switchBrand].switches[multi.st || meta.switchType].name : 'Switch N/A'}}</div>
<b class="caret"></b>
</button>
<ul class="dropdown-menu dropdown-select" role="menu">
<li ng-repeat="(k,v) in switches[multi.sm || meta.switchMount].brands[multi.sb || meta.switchBrand].switches"><a ng-click="setMulti('st',k)">{{v.name + (v.feel ? ', '+v.feel : '') + (v.weight ? ', '+v.weight.toString()+' cN' : '') + (meta.switchType===k ? ' (default)' : '')}}</a></li>
</ul>
</div>
</div>
</div>
</div>
<!-- Misc -->
<div class="form-group form-group-sm">
<label class="control-label col-md-3 col-lg-3 text-nowrap">Misc:</label>
<div class="col-md-9 col-lg-9">
<div class="form-inline">
<kbd-multi-check field="ghost" kbd-disable="multi.decal" hint-text="Specify whether the selected keys should be rendered slightly transparently; this is useful to draw attention to the other, non-ghosted keycaps.">Ghosted</kbd-multi-check>
<kbd-multi-check field="stepped" kbd-disable="multi.decal" hint-text="Specify whether the selected keys are 'stepped', i.e., part of the key is at a lower height than the rest. The secondary 'width' indicates the width of the stepped part.">Stepped</kbd-multi-check>
<kbd-multi-check field="nub" kbd-disable="multi.decal" hint-text="Specifies that the selected keys are 'homing' keys, which help the user find the home-row by touch alone.">Homing</kbd-multi-check>
<kbd-multi-check field="decal" hint-text="Specifies that the selected keys are to be treated as 'decals', i.e., purely decorative additions to the layout.">Decal</kbd-multi-check>
</div>
</div>
</div>
</form>
<!-- Color Palette -->
<div class="col-md-4 col-lg-4" ng-class="{hidden:!palette.name}">
{{palette.name}} <a ng-href='{{palette.href}}' data-hint="{{palette.description}}" class="hint--top hint--rounded" target="_blank">(more info)</a>
<ul id="swatches" ng-class="{disabled:selectedKeys.length<1}">
<li ng-repeat="color in palette.colors"
ng-style="{'background-color':color.css}"
ng-click="clickSwatch(color,$event)"
class="swatch"
ng-class="{'selected-bg': color.css === multi.color, 'selected-fg': color.css === multi.default.textColor}"
tooltip="{{color.name}}"
ui-draggable="true" drag-channel="dragColor" drag="color">
<div class='highlight fg'></div>
<div class='highlight bg'></div>
</li>
</ul>
<alert type="warning" style="margin-top:10px;" ng-hide="paletteAlertHidden" close="paletteAlertHidden = true">
<i class="fa fa-info-circle"></i> Click on a swatch to set the color of the selected key(s), or Ctrl+Click to set the text color. You can also drag color swatches to individual legends to set different colors for each one.
</alert>
</div>
<!-- Character Picker -->
<div class="col-md-6 col-lg-6" ng-class="{hidden:!picker.name}">
{{picker.name}} <a ng-if='picker.href' ng-href='{{picker.href}}' data-hint="{{picker.description}}" class="hint--top hint--rounded" target="_blank">(more info)</a>
<div class="col-md-12 col-lg-12" style="padding:4px 0px;">
<input id="picker-filter" class="form-control input-sm" type='text' ng-model="pickerFilter" placeholder="Filter"
ng-change="pickerSelection = {}">
</div>
<div id="glyphScroller">
<ul id="glyphs" ng-class="{disabled:selectedKeys.length<1}">
<li ng-repeat="glyph in picker.glyphs | filter:pickerFilter"
class="glyph"
tooltip="{{glyph.name}}"
ng-click="pickerSelect(glyph)"
ng-bind-html="glyph.html"
ng-class="{selected:pickerSelection===glyph}"
ui-draggable="true" drag-channel="dragGlyph" drag="glyph">
</li>
</ul>
</div>
<div class="col-md-12 col-lg-12" style="padding:4px 0px;">
<input id="picker-html" class="form-control input-sm" type='text'
ng-model="pickerSelection.html" placeholder="No glyph selected"
onClick="this.select();" readonly>
</div>
<alert type="warning" style="margin-top:40px;" ng-hide="pickerAlertHidden" close="pickerAlertHidden = true">
<i class="fa fa-info-circle"></i> Click on a glyph to see the HTML code for that glyph. You can also drag glyphs to the legend edit-boxes to assign them to the legend.
</alert>
</div>
</div>
<!-- KEYBOARD PROPERTIES EDITOR -->
<div id="kbdproperties" ng-class="{hidden:selTab!=1}">
<form class="form-horizontal col-sm-12 col-md-12 col-lg-12">
<!-- Keyboard Background -->
<div class="form-group form-group-sm">
<label class="control-label col-md-2 col-lg-1 text-nowrap" for="kbdcoloreditor">Case Background:</label>
<div class="col-md-10 col-lg-11">
<div class="form-inline">
<!-- Color -->
<kbd-color-picker picker-id="kbdcoloreditor"
ng-model="meta.backcolor"
ng-change="updateMeta('backcolor')"
ng-blur="validateMeta('backcolor')"
hint-text="Specify the background color for the keyboard."></kbd-color-picker>
<!-- Background image-->
<div class="form-group form-group-sm">
<div class="input-group input-group-sm hint--top hint--rounded" data-hint="Specify the background texture for the keyboard.">
<div class="btn-group btn-group-sm-form" dropdown>
<button type="button" class="btn btn-default dropdown-toggle" dropdown-toggle>{{meta.background ? meta.background.name : 'No Texture'}} <b class="caret"></b></button>
<ul class="dropdown-menu dropdown-select" role="menu">
<li><a ng-click='setBackground()'>None</a></li>
<li class="divider"></li>
<li ng-repeat="category in backgrounds">
<div class="dropdown-header" ng-attr-style="{{category.style}}">{{category.category}}:</div>
<ul class="menu">
<li ng-repeat="bg in category.content"><a ng-click='setBackground(bg)'>{{bg.name}}</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!-- Corner radii -->
<div class="form-group form-group-sm">
<label class="control-label text-nowrap" style='margin-left: 5px;' for="kbdradiieditor">Radii:</label>
<div class="hint--top hint--rounded"
data-hint="Specify the corner radii for this keyboard, in CSS3 format.
Some examples:
• 20px /*all corners rounded equally*/
• 10px 10px 10px 10px /*ditto, but less rounding*/
• 10px 10px 10px 10px / 20px 20px 20px 20px
• 40% / 20px
• 30px 30px / 40%">
<input id="kbdradiieditor" class="form-control input-sm" type='text'
ng-model="meta.radii"
ng-change="updateMeta('radii')"
ng-blur="validateMeta('radii')">
</div>
</div>
</div>
</div>
</div>
<!-- Keyboard Name -->
<div class="form-group form-group-sm">
<label class="control-label col-md-2 col-lg-1 text-nowrap" for="kbdnameeditor">Keyboard Name:</label>
<div class="col-md-10 col-lg-11 form-outdent hint--top hint--rounded"
data-hint="Specify the name of this keyboard layout.">
<input id="kbdnameeditor" class="form-control input-sm" type='text'
ng-model="meta.name"
ng-change="updateMeta('name')"
ng-blur="validateMeta('name')">
</div>
</div>
<!-- Author -->
<div class="form-group form-group-sm">
<label class="control-label col-md-2 col-lg-1 text-nowrap" for="authoreditor">Author:</label>
<div class="col-md-10 col-lg-11 form-outdent hint--top hint--rounded"
data-hint="Specify the author of this keyboard layout.">
<input id="authoreditor" class="form-control input-sm" type='text'
ng-model="meta.author"
ng-change="updateMeta('author')"
ng-blur="validateMeta('author')">
</div>
</div>
<!-- Default keyswitch options-->
<div class="form-group form-group-sm">
<label class="control-label col-md-2 col-lg-1 text-nowrap" for="defaultswitcheditor">Default switch:</label>
<!-- Default keyswitch mount style-->
<div class="form-inline form-outdent col-md-10 col-lg-11">
<div class="hint--top hint--rounded" data-hint="Specify the default mount style of switch for this keyboard layout.">
<select id="defaultswitcheditor" class="form-control input-sm dropdown"
ng-model="meta.switchMount"
ng-change="updateMeta('switchMount')"
ng-blur="validateMeta('switchMount')">
<option value="">Mount Style Not Specified</option>
<option ng-repeat="(k,v) in switches" value="{{k}}" ng-selected="meta.switchMount == k">{{v.name}}</option>
</select>
</div>
<!-- Default keyswitch brand-->
<div class="hint--top hint--rounded"
data-hint="Specify the default brand of key switch for this keyboard layout.">
<select class="form-control input-sm dropdown"
ng-model="meta.switchBrand"
ng-change="updateMeta('switchBrand')"
ng-blur="validateMeta('switchBrand')"
ng-disabled="!meta.switchMount">
<option value="">Brand Not Specified</option>
<option ng-repeat="(k,v) in switches[meta.switchMount].brands" value="{{k}}" ng-selected="meta.switchBrand == k">{{v.name}}</option>
</select>
</div>
<!-- Default keyswitch type-->
<div class=" hint--top hint--rounded"
data-hint="Specify the default type of key switch for this keyboard layout.">
<select class="form-control input-sm dropdown"
ng-model="meta.switchType"
ng-change="updateMeta('switchType')"
ng-blur="validateMeta('switchType')"
ng-disabled="!meta.switchMount || !meta.switchBrand">
<option value="">Switch Type Not Specified</option>
<option ng-repeat="v in switches[meta.switchMount].brands[meta.switchBrand].switches" value="{{v.part}}" ng-selected="meta.switchType == v.part">{{v.name + (v.feel ? ', '+v.feel : '') + (v.weight ? ', '+v.weight.toString()+' cN' : '')}}</option>
</select>
</div>
<!-- Switch mounting -->
<div class="form-group form-group-sm form-horizontal">
<label class="control-label text-nowrap" style='margin-left: 5px;' for="pcb">Mounted on:</label>
<div class="checkbox hint--top hint--rounded" data-hint="Specify if the switches are PCB mounted.">
<label style='margin-bottom: -3px;'>
<input type="checkbox" id="pcb" class="checkbox"
ng-model="meta.pcb"
ng-change="updateMeta('pcb')"
ng-blur="validateMeta('pcb')">
PCB
</label>
</div>
<div class="checkbox hint--top hint--rounded" data-hint="Specify if the switches are plate mounted.">
<label style='margin-bottom: -3px;'>
<input type="checkbox" id="plate" class="checkbox"
ng-model="meta.plate"
ng-change="updateMeta('plate')"
ng-blur="validateMeta('plate')">
Plate
</label>
</div>
</div>
</div>
</div>
<!-- Notes -->
<div class="form-group form-group-sm">
<label class="control-label col-md-2 col-lg-1 text-nowrap" for="noteseditor">Notes:</label>
<div class="col-md-10 col-lg-11 form-outdent">
<div class="hint--top hint--rounded" style="width:100%"
data-hint="Specify any additional notes about this keyboard layout, e.g., links to manufacturers, colors used, additional credits, etc. GitHub-Flavored Markdown is supported for rich formatting.">
<div id="noteseditor" class="form-control"
ui-ace="{mode:'markdown',theme:'textmate',onLoad:aceLoaded,useWrapMode:true,rendererOptions:{animatedScroll:true,showPrintMargin:false}}"
ng-model="meta.notes"
ng-change="updateMeta('notes')"
ng-blur="validateMeta('notes')"></div>
</div>
<div class="text-right">
<div class="btn-group btn-group-xs" role="group">
<button type="button" class="btn btn-success" ng-click="previewNotes()"><i class="fa fa-eye"></i> Preview</button>
</div>
<div class="btn-group btn-group-xs" role="group">
<a class="btn btn-primary" href="https://help.github.com/articles/markdown-basics/" target='_blank'><i class="fa fa-question-circle"></i> Markdown Syntax</a>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- CUSTOM STYLES EDITOR -->
<div id="tab-customstyles" ng-class="{hidden:selTab!=3}">
<div ngf-drop="true" ngf-change="uploadJson($files, $event)" ngf-drag-over-class="drag-over">
<div id="customstyles"
ui-ace="{mode:'css',theme:'textmate',onLoad:aceLoaded,useWrapMode:true,rendererOptions:{animatedScroll:true,showPrintMargin:false}}"
ng-model="meta.css"
ng-change="updateCustomStyles()"
ng-class="{error:customStylesException!==''}"></div>
</div>
<div style='text-align:right;margin-top:4px;'>
<div class="btn-group btn-group-xs" role="group">
<a class="btn btn-primary" href="https://github.com/ijprest/keyboard-layout-editor/wiki/Custom-Styles" target='_blank'><i class="fa fa-question-circle"></i> Custom Styles Syntax</a>
</div>
</div>
<div id="customstyles-error" class="alert alert-danger" style='margin-top:1em;margin-bottom:0px' ng-class="{hidden:!customStylesException}">{{customStylesException}}</div>
</div>
<!-- RAW DATA EDITOR -->
<div id="tab-rawdata" ng-class="{hidden:selTab!=2}">
<div ngf-drop="true" ngf-change="uploadJson($files, $event)" ngf-drag-over-class="drag-over">
<div id="rawdata"
ui-ace="{mode:'json',theme:'textmate',onLoad:aceLoaded,useWrapMode:true,rendererOptions:{animatedScroll:true,showPrintMargin:false}}"
ng-model="serialized"
ng-change="updateFromSerialized()"
ng-class="{error:deserializeException!==''}"></div>
</div>
<div style='text-align:right;margin-top:4px;'>
<div class="btn-group btn-group-xs" role="group">
<button type="button" class="btn btn-success" ng-click="downloadJson()"><i class="fa fa-download"></i> Download JSON</button>
<button ngf-select="true" class="btn btn-success" ngf-change="uploadJson($files, $event)"><i class="fa fa-upload"></i> Upload JSON</button>
</div>
<div class="btn-group btn-group-xs" role="group">
<a class="btn btn-primary" href="https://github.com/ijprest/keyboard-layout-editor/wiki/Serialized-Data-Format" target='_blank'><i class="fa fa-question-circle"></i> Raw Data Syntax</a>
</div>
</div>
<div id="rawdata-error" class="alert alert-danger" style='margin-top:1em;margin-bottom:0px' ng-class="{hidden:!deserializeException}">{{deserializeException}}</div>
</div>
<!-- SUMMARY -->
<div id="summary" ng-class="{hidden:selTab!=4}">
<div class="col-md-12 col-lg-12 row">
<div id='printSummary'>
<div>Title: {{meta.name}}</div>
<div>Author: {{meta.author}}</div>
<table class='summarytable'>
<tr><th class='summarytable' colspan='3'>Key sizes summary</th></tr>
<tr ng-repeat="(k,v) in keyCount()" class='summarytable'>
<td>{{k}}</td>
<td><span class="fa fa-square" ng-style="{'color':getTextColor(k)}"> </span></td>
<td align='right'>{{v}}</td>
</tr>
</table>
<table class='summarytable'>
<tr><th colspan='3'>Switches summary</th></tr>
<tr ng-repeat="(k,v) in switchCount()"><td>{{k}}</td><td>{{switchNames[k]}}</td><td>{{v}}</td></tr>
</table>
</div>
</div>
<div class="btn-group btn-group-xs" role="group">
<br><button type="button" class="btn btn-success" ng-click="printDiv('printSummary')"><i class="fa fa-print"></i> Print summary</button>
</div>
</div>
<div id="tools" ng-class="{hidden:selTab!=5}">
<div class="col-md-4 col-lg-4 row">
<h5>Remove Legends:</h5>
<div class="form-group form-group-sm form-horizontal">
<div ng-repeat="button in removeLegendsButtons" class="btn-group btn-group-xs" style="margin-right: 3px;" role="group">
<button type="button" class="btn btn-success hint--top hint--rounded" data-hint="{{button.tooltip}}" ng-click="removeLegends(button)">{{button.label}}</button>
</div>
</div>
<h5>Misc:</h5>
<div class="btn-group btn-group-xs">
<button type="button" class="btn btn-success hint--top hint--rounded" data-hint="Convert decals back into normal keys." ng-click="unhideDecals()"> Unhide decals</button>
</div>
</div>
<div class="col-md-2 col-lg-2 row">
<h5>Align Legends:</h5>
<div class="keycap" id="text-align">
<div class="keyborder"></div>
<div class="keylabels">
<div ng-repeat="(i,button) in alignLegendsButtons" class="keylabel keylabel{{i}}">
<div class="btn-group btn-group-xs">
<button type="button" class="btn btn-success" ng-click="alignLegends(button.flags)" ng-bind-html="button.label"></button>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-lg-4 row">
<h5>Move Legends:</h5>
<form>
<div class="keycap" id="label-move-src">
<div class="keyborder"></div>
<div class="keylabels">
<div ng-repeat="i in [0,1,2,3,4,5,6,7,8,9,10,11]" class="keylabel keylabel{{i}}">
<div><input type='radio' name='fromId' ng-model="$parent.moveFromId" ng-value='i'></div>
</div>
</div>
</div>
<div style="float:left;margin-top:40px;"> <i class="fa fa-arrow-right"></i> </div>
<div class="keycap" id="label-move-dst">
<div class="keyborder"></div>
<div class="keylabels">
<div ng-repeat="i in [0,1,2,3,4,5,6,7,8,9,10,11]" class="keylabel keylabel{{i}}">
<div><input type='radio' name='toId' ng-model="$parent.moveToId" ng-value='i'></div>
</div>
</div>
</div>
<button type="button" class="btn btn-success hint--top hint--rounded" data-hint="Move the legends in the From spot to the To spot." ng-click="moveSingleLegends()">Go</button>
</form>
</div>
<div class="col-md-4 col-lg-4 row">
<alert type="warning" style="margin-top:10px; margin-right:15px;" ng-hide="toolsAlertHidden" close="toolsAlertHidden = true">
<i class="fa fa-info-circle"></i> All tools will affect the selected keys only; if no keys are selected, tools will affect all keys.
</alert>
</div>
</div>
</div> <!-- END OF TAB CONTENT -->
<div class="row" style="margin-top:1em;margin-left:0px;">
<div class="col-md-12 col-lg-12">
<alert type="success" ng-hide="!saved" close="saved=false" ng-cloak>
Saved! Your saved layout can be accessed via <a class="alert-link" ng-href="#/gists/{{saved}}">this link</a>.
</alert>
<alert type="danger" ng-hide="!saveError" close="saveError=''" ng-cloak>
<P>There was an error saving your layout on the server: {{saveError}}</P>
<P>To ensure you don't lose any data, it is recommended that you <a class="alert-link" ng-click="downloadJson()">download your layout as JSON</a>.</P>
</alert>
<alert type="danger" ng-hide="!loadError" close="loadError=false" ng-cloak>
The requested layout does not exist.
</alert>
<alert type="danger" ng-hide="!oauthError" close="oauthError=null" ng-cloak>
An error occurred during login: {{oauthError}}
</alert>
</div>
</div>
</div> <!-- body -->
</div> <!-- body_all -->
</div> <!-- wrap -->
<!--***********************************************
Footer
************************************************-->
<div id="footer" ng-cloak>
<div class="container">
<div class="text-muted credit" style="float:left">
Keyboard Layout Editor v{{version}} (<a href='#' ng-click="showMarkdown('CHANGELOG.md', $event)">changelog</a>)<br/>
Copyright © 2013-2018 — Ian Prest (<a href='#' ng-click="showMarkdown('CONTRIB.md', $event)">and contributors</a>)<br/>
All rights reserved. (<a href='#' ng-click="showMarkdown('LICENSE.md', $event)">LICENSE</a>)
</div>
<div style="float:right;">
<a href="#" ng-click="showHelp($event)"><i class="fa fa-question-circle"></i> Help & keyboard shortcuts</a><br/>
<a href="https://github.com/ijprest/keyboard-layout-editor/issues" target="_blank"><i class="fa fa-bug"></i> Found a bug?</a><br/>
<a href="https://github.com/ijprest/keyboard-layout-editor" target="_blank"><i class="fa fa-github"></i> Code hosted on GitHub</a><br/>
</div>
</div>
</div>
<!--***********************************************
Help Dialog
************************************************-->
<script type="text/ng-template" id="helpDialog.html">
<div class="modal-header">
<button type="button" class="close" ng-click="cancel()">×</button>
<h4 class="modal-title">How to use keyboard-layout-editor.com</h4>
</div>
<div class="modal-body">
<h5>Getting Started:</h5>
<ul>
<li>Try loading one of the preset layouts from the dropdown at the top of the page.</li>
<ul>
<li>The <em>standard layouts</em> are intended to be used as a starting point for customization.</li>
<li>The <em>complex samples</em> are intended to give you an idea of the editor's capabilities, and to show off some awesome user-creations!</li>
</ul>
<li>Select a key in the editor by clicking on it; then try changing the various properties in the property-editor form.</li>
<li>You can select multiple keys by holding down CTRL and clicking on them, or extend the current selection by SHIFT-clicking on an item. You can also drag a marquee rectangle around the keys you want to select.</li>
<li>Try the keyboard shortcuts (described below); they make editing various properties much quicker.</li>
<li>You can save your layout to the server by clicking the 'Save' button on the toolbar.</li>
<li>You can save your layout locally by bookmarking the 'Permalink' (at the top of the page) in your bookmarks list.</li>
</ul>
<h5>Global Keyboard Shortcuts:</h5>
<dl class='dl-horizontal'>
<dt><kbd>F1</kbd> / <kbd>?</kbd></dt><dd>Show this help dialog</dd>
<dt><kbd>F7</kbd></dt><dd>Show the Options dialog</dd>
<dt><kbd>Ctrl–S</kbd></dt><dd>Save your layout (on the server)</dd>
</dl>
<h5>Editor Keyboard Shortcuts (these require that the editor has input focus):</h5>
<dl class='dl-horizontal' style='float:left;width:50%;'>
<dt><kbd>↑↓←→</kbd></dt><dd>Move the selected keys</dd>
<dt><kbd>Shift–↑↓←→</kbd></dt><dd>Resize the selected keys</dd>
<dt><kbd>Ctrl–↑↓←→</kbd></dt><dd>Move the center of rotation for the selected keys</dd>
<dt><kbd>PgUp</kbd> / <kbd>PgDn</kbd></dt><dd>Change the angle of rotation for the selected keys</dd>
<dt><kbd>Ins</kbd></dt><dd>Add a new key</dd>
<dt><kbd>Del</kbd></dt><dd>Delete the selected keys</dd>
<dt><kbd>F2</kbd></dt><dd>Edit the text of the selected key</dd>
</dl>
<dl class='dl-horizontal' style='float:left;width:50%;'>
<dt><kbd>Ctrl–A</kbd> / <kbd>Esc</kbd></dt><dd>Select / deselect all keys</dd>
<dt><kbd>J</kbd> / <kbd>K</kbd></dt><dd>Select the previous / next key in the editor.</dd>
<dt><kbd>Ctrl–Z</kbd></dt><dd>Undo</dd>
<dt><kbd>Ctrl–Shift–Z</kbd> or <kbd>Ctrl–Y</kbd></dt><dd>Redo</dd>
<dt><kbd>Ctrl–X</kbd> or <kbd>Shift–Del</kbd></dt><dd>Cut the selected keys</dd>
<dt><kbd>Ctrl–C</kbd> or <kbd>Ctrl–Ins</kbd></dt><dd>Copy the selected keys</dd>
<dt><kbd>Ctrl–V</kbd> or <kbd>Shift–Ins</kbd></dt><dd>Paste keys from the clipboard</dd>
</dl>
<p> </p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" ng-click="ok()">OK</button>
</div>