Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard #34

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c530e63
Keyboard - first steps
IrbisKronos Jul 21, 2023
5661609
formula for x,y
IrbisKronos Jul 21, 2023
607349b
fix: rendering
noomorph Jul 21, 2023
605ae33
First row
IrbisKronos Jul 21, 2023
4cb4d89
keyboard view
IrbisKronos Jul 24, 2023
cffa98f
small review
noomorph Jul 25, 2023
fe5cc7a
hovering over the keys
IrbisKronos Jul 25, 2023
d53e47b
light/dark keyboard in progress
IrbisKronos Jul 26, 2023
de210e2
light/dark keyboard theme is ready
IrbisKronos Jul 27, 2023
abcac07
downloads platform
IrbisKronos Jul 28, 2023
5320469
downloads platform in progress
IrbisKronos Aug 1, 2023
b0b6efe
downloads platform width download
IrbisKronos Aug 1, 2023
1fdc2ad
downloads platform fixes
IrbisKronos Aug 1, 2023
f798727
downloads platform fixes
IrbisKronos Aug 1, 2023
8feaac7
downloads platform optimize
IrbisKronos Aug 2, 2023
043d17c
downloads platform optimize fix
IrbisKronos Aug 2, 2023
d7f711b
mobile keyboard, beginning
IrbisKronos Aug 3, 2023
68ace5c
mobile keyboard
IrbisKronos Aug 4, 2023
be42364
KeyboardPreview
IrbisKronos Aug 4, 2023
edb23ce
CompactJSON in progress
IrbisKronos Aug 9, 2023
123a827
keyboard context in progress
IrbisKronos Aug 11, 2023
a065d62
keyboard context in progress
IrbisKronos Aug 11, 2023
46fe05e
full keyboard in progress
IrbisKronos Aug 16, 2023
0296c44
full keyboard in progress
IrbisKronos Aug 18, 2023
97dbb22
adapt compact keyboard
noomorph Aug 18, 2023
ac372ff
full-html keyboard in progress
IrbisKronos Aug 18, 2023
ae9a4e5
full keyboard - pre-prepared
IrbisKronos Aug 21, 2023
37d9aa6
full keyboard - pre-prepared update
IrbisKronos Aug 22, 2023
36705aa
full keyboard - pre-prepared update fix
IrbisKronos Aug 22, 2023
f5ec5d7
Merge branch 'main' into keyboard
noomorph Aug 23, 2023
1872df5
code review
noomorph Aug 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/learn/orthography.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ To summarise, there are several possibilities for writing the same word. The gen

[1]: #representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Here are some websites dedicated to the Interslavic language and culture:

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { KeyboardPreview } from "@site/src/components";
import layout from "@site/src/markdown/keyboards/art-Latn-x-interslv.json";

# Keyboards

### Windows \{#windows}
Expand Down Expand Up @@ -32,6 +35,7 @@ For the **Interslavic Cyrillic** alphabet:

- Serbian (exempted, without "Ы")

[1]: http://tyflonet.com/siciliano/klaviatury
<KeyboardPreview layout={layout} />

[1]: http://tyflonet.com/siciliano/klaviatury
[2]: http://usachov.eu/g
49 changes: 49 additions & 0 deletions docs/resources/keyboards/kbdmslat.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import { translate } from "@docusaurus/Translate";
import { KeyboardPreview, PlatformDownloads } from "@site/src/components";
import layout from "@site/src/markdown/keyboards/art-Latn-x-interslv.json";

# Interslavic Keyboard

This is the recommended keyboard layout tailored for all Slavic languages and dialects using Latin script, recognized or obscure: from Polish and Czech to less familiar and endangered languages and dialects.

<KeyboardPreview layout={layout} />

## Key features

- **Inclusivity**: Built upon the standard English keyboard, this layout integrates all the letters of the Latin alphabet and a variety of diacritical marks and typographical symbols, allowing seamless interaction in multiple languages.
- **Accessibility**: All special characters are readily available using combinations with the AltGr key or dead keys at the top of the keyboard.
- **Compatibility**: This keyboard layout is compatible with operating systems from Windows XP to the most recent ones.
- **Customizability**: The archive comes with a source file for the Microsoft Keyboard Layout Creator, enabling modifications to suit personal preferences.

## Downloads

<PlatformDownloads
featured={[
{
type: "windows",
link: "https://tyflonet.com/siciliano/kbdmslat.zip",
fileName: "kbdmslat.zip",
},
{
type: "mac",
link: "https://github.com/medzuslovjansky/keyboards/tree/main/mac",
fileName: "interslavic-kbd.pkg",
},
{ type: "deb", link: "#", fileName: "interslavic-kbd.deb" },
{ type: "rpm", link: "#", fileName: "interslavic-kbd.rpm" },
]}
/>

## Installation

<Tabs>
<TabItem value="win32" label={translate({ id: 'com.os.Windows', message: 'Windows' })} default>

The keyboard works on Windows XP, Vista, 7, 8, and newer operating systems. After unpacking the keyboard archive, click on the <code>KBDMSLAT.exe</code> file with the left mouse button. At the end of the installation, a dialogue appears with the "Close" button, which closes the installation. You can switch to the keyboard by pressing <kbd>Alt</kbd>+<kbd>Shift</kbd>, or if you are using the Slovenian keyboard as the base, by pressing <kbd>Ctrl</kbd>+<kbd>Shift</kbd>, because the keyboard installs under the Slovenian language (Slovenia, code SLO as the beginning of the word Slavic). To uninstall, click on the installation file and then on the "Finish" button.

</TabItem>
</Tabs>

In addition to the installation file, there is also a source file klc for the Microsoft Keyboard Layout Creator in the archive, with which you can modify the keyboard if you wish.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Interslavic выкарыстоўвае літару `ј` з сербскай і

[1]: #representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ custom_edit_url: /501

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Interslavic използва буквата `ј` от сръбската и ма

[1]: \#representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ custom_edit_url: /501

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Ukratko, postoji nekoliko mogućnosti za pisanje iste riječi. Opšta smjernica

[1]: \#representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Evo nekoliko web stranica posvećenih međuslavenskom jeziku i kulturi:

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Abych to shrnul, existuje několik možností, jak napsat stejné slovo. Obecná

[1]: #representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Zde jsou některé webové stránky věnované mezislovanskému jazyku a kultuř

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
18 changes: 17 additions & 1 deletion i18n/en/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,22 @@
"message": "IPA"
},
"com.markdown.Pronunciation": {
"message": "Pronunciation"
"message": "Pronun\u00ADciation"
},
"com.platform.windows": {
"message": "Windows",
"description": "Windows Platform"
},
"com.platform.mac": {
"message": "MacOS",
"description": "Mac Platform"
},
"com.platform.deb": {
"message": "Debian",
"description": "Debian Platform"
},
"com.platform.rpm": {
"message": "Fedora",
"description": "Fedora Platform"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Ukratko, postoji nekoliko mogućnosti za pisanje iste riječi. Opća smjernica j

[1]: #representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Evo nekoliko web stranica posvećenih međuslavenskom jeziku i kulturi:

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Interslavic ја користи буквата `ј` од српската и м

[1]: \#representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ custom_edit_url: /501

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Podsumowując, istnieje kilka możliwości napisania tego samego słowa. Ogólna

[1]: #representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Poniżej jest kilka stron poświęconych językowi i kulturze międzysłowiańsk

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ import DisappearedPhonemes from '@site/src/markdown/disappeared-phonemes.mdx';

[1]: #representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ custom_edit_url: /501

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Aby som to zhrnul, existuje niekoľko možností na napísanie toho istého slov

[1]: #representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Tu je niekoľko webových stránok venovaných medzislovanským jazykom a kultú

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Naslednja tabela prikazuje ujemanja med zgoraj omenjenimi črkami (predlagana al

[1]: \#representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Tukaj je nekaj spletnih mest, posvečenih medslovanskemu jeziku in kulturi:

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ import DisappearedPhonemes from '@site/src/markdown/disappeared-phonemes.mdx';

[1]: #representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ custom_edit_url: /501

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Interslavic використовує літеру `ј` із сербської

[1]: #representation-of-problematic-characters

[2]: ../resources/keyboards.md
[2]: ../resources/keyboards/index.md

[3]: https://web.archive.org/web/20230201091637/http://grzegorz.jagodzinski.prv.pl/gram/en/ipa.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ custom_edit_url: /501

[17]: https://www.patro.cz/interslavic-zonal-constructed-language/

[18]: ./keyboards.md
[18]: ./keyboards/index.md

[19]: https://interslavic-dictionary.com/

Expand Down
68 changes: 68 additions & 0 deletions src/components/KeyboardPreview/Compact.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import React, { useCallback } from 'react'
import clsx from 'clsx'
import styles from "./Compact.module.scss"
import { useKey } from './keyboard-context.js';

const SERVICE_KEYS = new Set(['ControlLeft', 'AltLeft', 'Space', 'AltRight', 'ControlRight', 'ArrowLeft', 'ArrowUp', 'ArrowDown', 'ArrowRight', 'ShiftLeft', 'ShiftRight', 'CapsLock', 'Enter', "Escape", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "Delete", "Backspace", "Tab"]);

const keys = [
["Escape", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "Delete"],
["Backquote", "Digit1", "Digit2", "Digit3", "Digit4", "Digit5", "Digit6", "Digit7", "Digit8", "Digit9", "Digit0", "Minus", "Equal", "Backspace"], ,
["Tab", "KeyQ", "KeyW", "KeyE", "KeyR", "KeyT", "KeyY", "KeyU", "KeyI", "KeyO", "KeyP", "BracketLeft", "BracketRight", "Backslash"],
["CapsLock", "KeyA", "KeyS", "KeyD", "KeyF", "KeyG", "KeyH", "KeyJ", "KeyK", "KeyL", "Semicolon", "Quote", "Enter"],
["ShiftLeft", "KeyZ", "KeyX", "KeyC", "KeyV", "KeyB", "KeyN", "KeyM", "Comma", "Period", "Slash", "ShiftRight"],
['ControlLeft', 'AltLeft', 'Space', 'AltRight', 'ControlRight', 'ArrowLeft', 'ArrowUp', 'ArrowDown', 'ArrowRight'],
];

export default function Compact({ className }) {
return (
<div>
<figure className={styles.figure}>
<figcaption>Default</figcaption>
<CompactKeyboard className={className} />
</figure>
<figure className={styles.figure}>
<figcaption>Shift</figcaption>
<CompactKeyboard className={className} modifier={1} />
</figure>
<figure className={styles.figure}>
<figcaption>Alt</figcaption>
<CompactKeyboard className={className} modifier={6} />
</figure>
<figure className={styles.figure}>
<figcaption>Alt + Shift</figcaption>
<CompactKeyboard className={className} modifier={7} />
</figure>
</div>
);
}

function CompactKeyboard({ className, layout, modifier }) {
return (
<div className={clsx(styles.keyboard, className)}>
{keys.map((row, rowIndex) => (
<div key={rowIndex} className={styles.row}>
{row.map((code, columnIndex) => (
<CompactKey key={columnIndex} code={code} layout={layout} modifier={modifier} />
))}
</div>
))}
</div>
);
}

function CompactKey({ code, modifier: modifierOverride }) {
const context = useKey().keyboardState;
const { layout, state, modifier: modifierDynamic, pressed, onKeyDown, onKeyUp } = context;
const modifier = modifierOverride ?? modifierDynamic;
const content = layout.states[state][code]?.[modifier] ?? '\u00a0';

/* const onMouseDown = useCallback(() => onKeyDown(code), [code, onKeyDown]);
const onMouseUp = useCallback(() => onKeyUp(code), [code, onKeyUp]); */

return (
<span className={clsx(styles.key, { [styles.inactive]: SERVICE_KEYS.has(code), [styles.pressed]: pressed.has(code) })} /* onMouseDown={onMouseDown} onMouseUp={onMouseUp} */>
{content}
</span>
);
}
Loading