Skip to content

miozus/keyboardTemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Keyboard Template

Render & output keyboard for keymap designer

supports 60 keystrokes | Winodws | MacOS

Install & Run

git clone https://github.com/miozus/keyboardTemplate
npm install
npm run dev
# open chrome
http://localhost:3000/

Usage

❯ tree -L 4 -I 'node_modules'
.
β”œβ”€β”€ README.md
β”œβ”€β”€ index.html
β”œβ”€β”€ package.json
β”œβ”€β”€ postcss.config.js
β”œβ”€β”€ public
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ App.vue
β”‚   β”œβ”€β”€ assets
β”‚   β”‚   β”œβ”€β”€ css              <- 3️⃣ global keystroke css style (optional)
β”‚   β”‚   β”‚   β”œβ”€β”€ keyboard.css
β”‚   β”‚   β”‚   └── tailwind.css 
β”‚   β”‚   └── fonts
β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”œβ”€β”€ Keyboard.vue     <- 4️⃣ render and download controller (optional)
β”‚   β”‚   β”œβ”€β”€ Nav.vue          <- 1️⃣ import keyboard json (copy data/normal.json then change)
β”‚   β”‚   └── Tabs.vue
β”‚   β”œβ”€β”€ data                 <- 2️⃣ custom keyboard as json 
β”‚   β”‚   β”œβ”€β”€ normal.json
β”‚   β”‚   β”œβ”€β”€ portia.json
β”‚   β”‚   └── semicolon.json
β”‚   └── main.js
β”œβ”€β”€ tailwind.config.js      
└── vite.config.js

1️⃣ import

import debug from "../data/debug.json";

//...

export default defineComponent({
  data() {
    return {
      categories,   
      keymap: debug,    // your keyboard name
    };
  },
});

2️⃣ custom

An example of one keystroke in /data/debug.json

{
   "id":7,          // sorted Id which is relate to formatter
   "name":"^6",     // origin name as physical keyboard shown
   "class":"desc ", // css style name comes from global setting 3️⃣
   "text":"debug",  // bottom content of one keystroke
   "visible":true,  // visible or not
   "emoji":"🐞"     // up content of one keystroke
}

4️⃣ render and output

one stroke (default: click invokes download):

debug

all (defualt: click website left-bottom download):

debug-keyboard

Question Shoot

Q1: How to render correctly emoji on Chrome?

About

Render & output keyboard for keymap designer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors