Welcome, Guest. Please login or register.
Did you miss your activation email?
2018-Oct-15 08:49

Login with username, password and session length

Recent

Shoutbox

Den:
Oct. 14 2018 - 5:03am
finally leveler cards is possible on card creator
Den:
Oct. 11 2018 - 12:43am
Vogon Full Art are so awesome
oohrah ;D
Den:
Oct. 09 2018 - 2:15am
KARA are Pretty Girls ... yeah yeah
Den:
Oct. 05 2018 - 2:02pm
Friday. get ready for more Last Man Standing  ;D
Den:
Oct. 03 2018 - 9:28pm
new card frames: Vogon HD, allows much more room for texts, incl. name, type, and esp. rules
Den:
Oct. 02 2018 - 7:48am
more card creator changes
Den:
Sep. 28 2018 - 5:08pm
Jim Morrison = Mr. Mojo Risin'
Den:
Sep. 19 2018 - 4:15pm
twit to image works again

Author Topic: Generating Images of Keyboard Layouts  (Read 744 times)

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1189
  • Selina is my Superstar
    • View Profile
    • Amuseum
Generating Images of Keyboard Layouts
« on: 2017-Oct-21 16:24 »
In need of fast way to generate keyboard layouts.

Given layout definition (ex. in JSON), this script should generate an image file (in PNG). Preferably executable in a browser.

Solution in KLA:
[Might not work for some browsers. Works in Vivaldi (chrome).]
In Configuration page, choose the layout, then at bottom, see Layout Image, click Generate button. An small image for the current layout appears adjacent. (The same image remains even if you change layout. So you must manually regenerate if you want another image for different layout.) The image can be clicked for direct download (probably to your browser's default download folder; filename will match layout's name), or right click on the image to open browser menu to view the image in new tab.
« Last Edit: 2017-Oct-21 17:44 by Den »
Support me on Patreon

I saw. I conquered. I came.

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1189
  • Selina is my Superstar
    • View Profile
    • Amuseum
Re: Generating Images of Keyboard Layouts
« Reply #1 on: 2017-Oct-23 09:47 »
Actually the latest Firefox has the tool to take a snapshot of anything you see on the webpage. So that would be the simplest method. No coding necessary.

iandoug

  • Hero Member
  • *****
  • Posts: 880
    • View Profile
    • Keyboard Design
Re: Generating Images of Keyboard Layouts
« Reply #2 on: 2017-Oct-29 11:19 »
Actually the latest Firefox has the tool to take a snapshot of anything you see on the webpage. So that would be the simplest method. No coding necessary.

Which version? (I'm on 52.4.0 (64-bit), Gentoo tends to be a few releases behind 'Current' because they like to make sure it's stable).

As previously mentioned, I have a tool that merges KLA json onto KLE template.

In the mean time this new tool was launched:

https://kle-render.herokuapp.com/

So I'm going to write a proggie that will rewrite KLA json into KLE format (since we have limited physical layouts ATM, should not be too difficult) then can feed resulting json to this tool.

I have downloaded the repo but need to figure out how to make nginx serve python.... only ever worked with PHP and Perl.
I want to use different fonts to what he is using.

I know it's not a one-step process like you wanted....
(coincidentally my head has started pondering the possibility of merging KLE and KLA ... but suppose that won't work ... but would be cool if it did, and allowed us to evaluate the effect of different physical setups on a given logical layout. Or possibly merging this rendering into KLE. I'll let it percolate.... :-) )

If you like in the mean time I can send you my renders of the various BEAKLs for your DT page.

Still fiddling with my Layout Management System. Need to co-ordinate "all layouts" with "what should be in KLE" vs "what IS IN KLE", as well as getting the meta data sorted. I see a lot of the layouts in KLA have wrong finger allocations, eg left Control is assigned to Left Thumb, where it should be left pinky. So will have to gradually fix all those as well... has a lower priority right now.

Current screenshot (FWIW) attached. Going to add Author/Inventor/Submitter/Modded by and URLS to bottom right side. Current "Author" field is not satisfactory, hence the new ones.
The process will generate new db.js after each edit.

Cheers, Ian

iandoug

  • Hero Member
  • *****
  • Posts: 880
    • View Profile
    • Keyboard Design
Re: Generating Images of Keyboard Layouts
« Reply #3 on: 2017-Oct-29 18:00 »
So I'm going to write a proggie that will rewrite KLA json into KLE format (since we have limited physical layouts ATM, should not be too difficult) then can feed resulting json to this tool.

Decided to start with Matrix layouts...
Work in progress. Need to fix the code that handles non-chars like Alt/Ctrl etc. But need to go to bed now.
Had to set key profile to OEM, which makes the text small. The default SA profile has bigger text but switches everything to upper case.
Not running locally yet so I can't tweak those things.


iandoug

  • Hero Member
  • *****
  • Posts: 880
    • View Profile
    • Keyboard Design
Re: Generating Images of Keyboard Layouts
« Reply #4 on: 2017-Oct-29 18:33 »
Beakl 10.

Had to use words, the fonts used on server don't have all the special characters.

I know it's not 19 keys across, the renderer can't handle that many so had to make gap in middle smaller.

 

4 Guests, 0 Users