Skip to content

Commit 66dadf3

Browse files
committed
Add norwegian keyboard layout
1 parent 6dbf4a8 commit 66dadf3

File tree

2 files changed

+124
-0
lines changed

2 files changed

+124
-0
lines changed

packages/keyboard/src/layouts/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
// Distributed under the terms of the Modified BSD License.
33

44
export { EN_US } from './en-US';
5+
export { NB_NO } from './nb-NO';
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
// Copyright (c) Jupyter Development Team.
2+
// Distributed under the terms of the Modified BSD License.
3+
4+
import { IKeyboardLayout, KeycodeLayout } from '../core';
5+
6+
import { MODIFIER_KEYS } from '../special-keys';
7+
8+
/**
9+
* A code-based keyboard layout for a common Norwegian keyboard.
10+
*
11+
* Note that this does not include Apple's magic Keyboards, as they map
12+
* the keys next to the Enter key differently (BracketRight and
13+
* Backslash on en-US).
14+
*/
15+
export const NB_NO: IKeyboardLayout = new KeycodeLayout(
16+
'nb-NO',
17+
{},
18+
MODIFIER_KEYS,
19+
{
20+
AltLeft: 'Alt',
21+
AltRight: 'AltGraph',
22+
Backquote: '|',
23+
Backslash: "'",
24+
Backspace: 'Backspace',
25+
BracketLeft: 'Å',
26+
CapsLock: 'CapsLock',
27+
Comma: ',',
28+
ContextMenu: 'ContextMenu',
29+
ControlLeft: 'Control',
30+
ControlRight: 'Control',
31+
Delete: 'Delete',
32+
Digit0: '0',
33+
Digit1: '1',
34+
Digit2: '2',
35+
Digit3: '3',
36+
Digit4: '4',
37+
Digit5: '5',
38+
Digit6: '6',
39+
Digit7: '7',
40+
Digit8: '8',
41+
Digit9: '9',
42+
End: 'End',
43+
Enter: 'Enter',
44+
Equal: '\\',
45+
Escape: 'Escape',
46+
F1: 'F1',
47+
F10: 'F10',
48+
F11: 'F11',
49+
F12: 'F12',
50+
F2: 'F2',
51+
F3: 'F3',
52+
F4: 'F4',
53+
F5: 'F5',
54+
F6: 'F6',
55+
F7: 'F7',
56+
F8: 'F8',
57+
F9: 'F9',
58+
Home: 'Home',
59+
Insert: 'Insert',
60+
IntlBackslash: '<',
61+
KeyA: 'A',
62+
KeyB: 'B',
63+
KeyC: 'C',
64+
KeyD: 'D',
65+
KeyE: 'E',
66+
KeyF: 'F',
67+
KeyG: 'G',
68+
KeyH: 'H',
69+
KeyI: 'I',
70+
KeyJ: 'J',
71+
KeyK: 'K',
72+
KeyL: 'L',
73+
KeyM: 'M',
74+
KeyN: 'N',
75+
KeyO: 'O',
76+
KeyP: 'P',
77+
KeyQ: 'Q',
78+
KeyR: 'R',
79+
KeyS: 'S',
80+
KeyT: 'T',
81+
KeyU: 'U',
82+
KeyV: 'V',
83+
KeyW: 'W',
84+
KeyX: 'X',
85+
KeyY: 'Y',
86+
KeyZ: 'Z',
87+
MetaLeft: 'Meta', // chrome
88+
MetaRight: 'Meta', // chrome
89+
Minus: '+',
90+
NumLock: 'NumLock',
91+
Numpad0: 'Insert',
92+
Numpad1: 'End',
93+
Numpad2: 'ArrowDown',
94+
Numpad3: 'PageDown',
95+
Numpad4: 'ArrowLeft',
96+
Numpad5: 'Clear',
97+
Numpad6: 'ArrowRight',
98+
Numpad7: 'Home',
99+
Numpad8: 'ArrowUp',
100+
Numpad9: 'PageUp',
101+
NumpadAdd: '+',
102+
NumpadDecimal: 'Delete',
103+
NumpadDivide: '/',
104+
NumpadEnter: 'Enter',
105+
NumpadMultiply: '*',
106+
NumpadSubtract: '-',
107+
OSLeft: 'OS', // firefox
108+
OSRight: 'OS', // firefox
109+
PageDown: 'PageDown',
110+
PageUp: 'PageUp',
111+
Pause: 'Pause',
112+
Period: '.',
113+
PrintScreen: 'PrintScreen',
114+
Quote: 'Æ',
115+
ScrollLock: 'ScrollLock',
116+
Semicolon: 'Ø',
117+
ShiftLeft: 'Shift',
118+
ShiftRight: 'Shift',
119+
Slash: '-',
120+
Space: ' ',
121+
Tab: 'Tab'
122+
}
123+
);

0 commit comments

Comments
 (0)