Upload failed. Maybe wrong permissions?

User Tools

Site Tools






Create Your Own Best Keyboard

To make your keyboard in Best’s Board, you don’t need more than a simple text editor, either on your PC or on your Android device itself. To reach characters currently not on your keyboard, you can use any Unicode table app or web site.

Things To Be On The Keyboard

Collect the characters and functions what you want to see on your keyboard. No doubt you’ll need a least
  – the characters of your language(s);
  – basic punctuation;
  – digits;
  – a space key, Backspace, Enter, Shift.
  Beyond that, you can add anything. You can add any character or even strings of characters. Frequently used email or web addresses, greetings, anything. No limits.
  In this article, I’ll use a Livonian keyboard as an example. This language has many letters with diacritics:
  āäǟḑēīļņōȯȱöȫõȭŗšţūȳž
  Since Livonian is an extinct language once spoken in Latvia, I add letters č ģ ķ for Latvian. This is 24 letters, in addition to the 26 of the English alphabet, so, 50.
  Let’s add some basic punctuation: , . ; : ? ! - ’ ( ) @ *. This is 12 characters. But of course I could choose 20 or 50 or 200. No limits.
  Keep in mind you can change anything later. Did you miss a character? Add it. A character isn’t at a comfortable place? Move it to somewhere else. Don’t like the colors? Change them.

How To Reach Characters

For diacritical letters the question arises how to reach them. Best offers several methods that can even be combined; for example, my own keyboard I’m typing this article on has 16 dedicated keys for 16 diacritical letters, one letter each, and two additional keys for several hundreds of characters.
  Here are the possible methods. Which one(s) to use is up to you.

An Own Key For Each Letter

For frequently used letters, I recommend this always. It’s no longer the PC keyboard with 48 little plastic caps you have to be satisfied with (all the others being reserved for special functions). You can draw as many hexagons as you wish. On my layout, there are currently 114. But you can have as few or as many as you wish. No limit – by the abilities of Best. But you need to calculate with the size of your Android device. You can have a large number of keys even on a small phone, but it’ll be uncomfortable to use them.

Modifiers

A modifiers takes the character in the text before the cursor, and replaces it by the next character from a list (called a roll), specified by yourself. You can have as many modifiers as you wish. Each modifier can have as many rolls as you wish. Each roll can be as long as you wish. No limits.
  When a modifier is pressed, Best takes the character before the sursor and set of rolls you specified for that modifier, and looks for the character in them. If it’s found, the next character on that roll will be replaced; if the character is the last one on the roll, the first one is replaced to it. If the character isn’t present on any of the roll of that modifier, nothing happens.
  Some examples:

"aāäǟ" "cč" "dḑ" "eē" "gģ" "iī" "kķ" "lļ" "nņ" "oōȯȱöȫõȭ" "rŗ" "sš" "tț" "uū" "yȳ" "zž"
  This is a modifier with 16 rolls, each enclosed in double quotation marks. This may be an approach to reach both Livonian and Latvian on one single key, added to the 26 English letters. You press g, then this modifier, and get ģ. Easy. But to reach ȭ, you’ll need to press the letter o and then the modifier 7 times, what may be tiresome for a longer text, so, it’s possible to create separate keys for, say, letters ö and õ. Or of course, you can have separate keys for any number of diacritical letters and still include a modifier.

",.-:;?!’()@*"
  This lets you have 12 punctuation keys at the cost of at least on punctuation key (to type either one of them) and the modifier. Of course, this may be the same modifier as in the previous example.

ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,:;?!’()@
  This isn’t for our Livonian project. It’s an example for a modifier that works similar to old VHS and DVD recorders when you wanted to name channels or records: from an initial character which was the space, each pressing of an arrow key stepped to the next character in a set alphabet, and the opposite alphabet stepped backwards. With a modifier like this, you can practically have a keyboard with only four keys: the space key (to have an initial space to be modified), the modifier, an Enter and a Backspace key. Of course this wouldn’t be very comfortable but may be useful when screen real estate is an issue.

"2ABC" "3DEF" "4GHI" "5JKL" "6MNO" "7PQRS" "8TUV" "9WXYZ"
  Another approach for a method to reach letters of the alphabet with a very small number of keys. Provided a numeric keyboard, this lets the user to reach letters like on phone keyboards.

"aα" "bβ" "cχ" "dδ" "eε" "fφ" "gγ" "hη" "iι" "jς" "kκ" "lλ" "mμ" "nν" "oο" "pπ" "qθ" "rρ" "sσ" "tτ" "uυ" "wω" "xξ" "yψ" "zζ"
  This is a way to reach Greek letters with a modifier from Latin ones. For continuous typing in Greek language, no way I’d recommend it, but if the Greek letters are needed only occasionally, like for some scientific purposes, it may be practical.

Modifiers can form chains. Since a modifier doesn’t know and needs not to know if the character it is replacing was the result of another modifier, you can have chains like these:
  1. press a
  2. press the macron modifier and get ā
  3. press the umlaut modifier and get ǟ
  or
  1. press a
  2. press the umlaut modifier and get ä
  3. press the macron modifier and get ǟ
  It’s best to define both, so you don’t need to worry about the order.

Stickies

A sticky key can have up to 12 functions. One by just tapping on the key, and 12 by putting your finger or stylus on it and stroking to either one of 12 directions, like on a clock face. This means you can, for example, the 24 Livonian and Latvian letters on two keys, and you still have two functions available. For example, two punctuation characters may be surrounded with them. Or, like with the examples for modifiers, you can build two keys with the complete English alphabet, that’s 26 letters, so one would be on each key and 12 surrounding it.
  Stickies can be also modifiers. As I mentioned above, I have on my keyboard two keys that can reach hundreds of characters. This is because those keys are having 12 modifiers on each, for different diacritic symbols, and all of them have several rolls, including chained meanings.

More Layouts

A layout is the grid of hexagonal buttons. It can contain a number of buttons (limited by the screen size only), but that may insufficient in many cases. Then we can have additional layouts. My keyboard, for example, has 31 at the moment: I have an independent layout for Hungarian and Latvian, one for Cyrillic, one for Greek, one for Armenian, one for Arabic, and all five are combined with six pages of memory buttons, thus yielding 30. The last one is for Visibone color codes.
  The different layouts may be of different sizes and colors, and you can navigate between them with switch buttons.
  In this article, we’ll skip the layout switching technique, being satisfied with one.

Arranging Characters

For the sake of this demonstration, I decided the following, only because I want to be able to demonstrate different methods:
  – Livonian letters ä ȯ ö õ will receive a button on their own;
  – there will be a modifier to add the macron;
  – and another one to add both the caron and cedilla.
  We’ll have an own key for each punctuation mark and digit. This means that we’ll have 26 + 4 letters + 12 punctuation + 10 digits + 4 function keys + 2 modifiers, totalling 58. This can be achieved by five rows of 12 buttons in each, and we’ll have two spare buttons.
  First, we have to decide which button to put where. I’m used to set a text editor to a monospaced font, and design the hexagonal grid. I’m writing the complete character set in the first row:
  aäbcdefghijklmnoȯöõpqrstuvwxyz.,-:;?!()@’*0123456789_BE^MC
  Since I’ll use single characters for representing a button, the function keys will be symbolized by additional characters:
  _ the space
  B the Backspace
  E the Enter
  ^ the Shift
  M the macron modifier
  C the caron and cedilla modifier
  And in the next rows (five, since we decided to use five rows) I design the grid. For real purposes, it’s best to use some statistics about letter frequencies, letter pair and letter triplet sequences of the language, but none is available for Livonian, and this is just a demonstration. Let’s pretend there is some reason in the arrangement I make.
  (On the following charts, a © symbol will represent the @ for technical reasons.)

äbcdfghjlmnoȯöpqrstvwxyz.,-:;?!()©’*0123456789BE^MC
 k õ
a _ e
 i u

The top row serves as an aid to let me know which characters are left. When adding one to the grid, I’m removing them from this row. I’ve started with a ring of six hexagons around the space button. Let’s add another ring of frequent letters around them.

bcdfgöqvwxyz.,-:;?!()©’*0123456789BE^MC
  n r ȯ
 o k õ t
s a _ e m
 p i u l
  ä h j

Now we’ve got the height of five rows as wanted, let’s add keys to both sides.

0123456789BE
  * ’ © M c n r ȯ v
 : ; - C f o k õ t y
( ) ? w g s a _ e m d
 ! . , x q p i u l b
        ^ z ä h j ö

…wait. Where to place the digits? They should be grouped together somehow, shan’t they? Let’s reorder it a bit.

 ! * ’ © M c n r ȯ v B :
? ( ) - C f o k õ t y E
 7 8 9 w g s a _ e m d
4 5 6 0 x q p i u l b ;
 1 2 3 ^ z ä h j ö , .

We’re ready, now we know where to put what. we can start coding. let’s open an empty text document and type:

coat (1000)

The Layout Definition

We have to define a layout. This is done by a line like this:

addlayout (id mylayout start
	rows 5 columns 12 align evens turnoff (caps)
	asboard color 0nk linecolor 0nodt linesize 1
)

Now we have an empty layout in the size wanted. Its background color is black (0nk), the grid will be drawn in obscure dull teal (0nodt), and a half button will be on the top left corner (align evens).

The Block

Our keys will be arranged in a block. Actually, we can have a number of blocks that may be freely rearranged, but for this demonstration, one is enough. To start the block:

block (row 1 column 1

and now we can add buttons.

  button (text "" color 0nk addtitle (color 0ndhs size 1700))

This is the empty skeleton of the block we can fill with characters; we need one for each button except special ones that are defined different ways. I’m copying and pasting this line once for each key, adding crl for carriage return left and crr for carriage return right at the line ends.

block (row 1 column 1
r
  button (text "!" color 0nk addtitle (color 0ndhs size 1700))
  button (text "*" color 0nk addtitle (color 0ndhs size 1700))
  button (text "’" color 0nk addtitle (color 0ndhs size 1700))
  button (text "" color 0nk addtitle (color 0ndhs size 1700))
  button (text "macron" color 0nk addtitle (color 0ndhs size 1700))
  button (text "c" color 0nk addtitle (color 0ndhs size 1700))
  button (text "n" color 0nk addtitle (color 0ndhs size 1700))
  button (text "r" color 0nk addtitle (color 0ndhs size 1700))
  button (text "ȯ" color 0nk addtitle (color 0ndhs size 1700))
  button (text "v" color 0nk addtitle (color 0ndhs size 1700))
  button (text "bksp" color 0nk addtitle (color 0ndhs size 1700))
  button (text ":" color 0nk addtitle (color 0ndhs size 1700))
crr
  button (text "?" color 0nk addtitle (color 0ndhs size 1700))
  button (text "(" color 0nk addtitle (color 0ndhs size 1700))
  button (text ")" color 0nk addtitle (color 0ndhs size 1700))
  button (text "-" color 0nk addtitle (color 0ndhs size 1700))
  button (text "caron" color 0nk addtitle (color 0ndhs size 1700))
  button (text "f" color 0nk addtitle (color 0ndhs size 1700))
  button (text "o" color 0nk addtitle (color 0ndhs size 1700))
  button (text "k" color 0nk addtitle (color 0ndhs size 1700))
  button (text "õ" color 0nk addtitle (color 0ndhs size 1700))
  button (text "t" color 0nk addtitle (color 0ndhs size 1700))
  button (text "y" color 0nk addtitle (color 0ndhs size 1700))
  button (text "enter" color 0nk addtitle (color 0ndhs size 1700))
crr
  button (text "7" color 0nk addtitle (color 0ndhs size 1700))
  button (text "8" color 0nk addtitle (color 0ndhs size 1700))
  button (text "9" color 0nk addtitle (color 0ndhs size 1700))
  button (text "w" color 0nk addtitle (color 0ndhs size 1700))
  button (text "g" color 0nk addtitle (color 0ndhs size 1700))
  button (text "s" color 0nk addtitle (color 0ndhs size 1700))
  button (text "a" color 0nk addtitle (color 0ndhs size 1700))
  button (text "space" color 0nk addtitle (color 0ndhs size 1700))
  button (text "e" color 0nk addtitle (color 0ndhs size 1700))
  button (text "m" color 0nk addtitle (color 0ndhs size 1700))
  button (text "d" color 0nk addtitle (color 0ndhs size 1700))
crl
  button (text "4" color 0nk addtitle (color 0ndhs size 1700))
  button (text "5" color 0nk addtitle (color 0ndhs size 1700))
  button (text "6" color 0nk addtitle (color 0ndhs size 1700))
  button (text "0" color 0nk addtitle (color 0ndhs size 1700))
  button (text "x" color 0nk addtitle (color 0ndhs size 1700))
  button (text "q" color 0nk addtitle (color 0ndhs size 1700))
  button (text "p" color 0nk addtitle (color 0ndhs size 1700))
  button (text "i" color 0nk addtitle (color 0ndhs size 1700))
  button (text "u" color 0nk addtitle (color 0ndhs size 1700))
  button (text "l" color 0nk addtitle (color 0ndhs size 1700))
  button (text "b" color 0nk addtitle (color 0ndhs size 1700))
  button (text ";" color 0nk addtitle (color 0ndhs size 1700))
crr
  button (text "1" color 0nk addtitle (color 0ndhs size 1700))
  button (text "2" color 0nk addtitle (color 0ndhs size 1700))
  button (text "3" color 0nk addtitle (color 0ndhs size 1700))
  button (text "shift" color 0nk addtitle (color 0ndhs size 1700))
  button (text "z" color 0nk addtitle (color 0ndhs size 1700))
  button (text "ä" color 0nk addtitle (color 0ndhs size 1700))
  button (text "h" color 0nk addtitle (color 0ndhs size 1700))
  button (text "j" color 0nk addtitle (color 0ndhs size 1700))
  button (text "ö" color 0nk addtitle (color 0ndhs size 1700))
  button (text "," color 0nk addtitle (color 0ndhs size 1700))
  button (text "." color 0nk addtitle (color 0ndhs size 1700))
)

Saving this and loading into Best’s Board will give an almost perfect result.
  bestdemo1.jpg
  Of course the special buttons won’t work yet, I’ve simply entered their names there; instead of doing what they should do, these buttons simply type the words on them. Let’s fix it.

Backspace

  button (backspace color 0nk addtitle (color 0ndhs size 1700))

This is the code for the Backspace key. The default title on it is BS but you can add another title with text "anything" inside the bracket after addtitle.

Enter

enter (color 0nk addtitle (color 0ndhs size 1700))

Here we define the Enter key. Note that the keyword button is not used here. The default title on it is CR.

Caps

  meta (caps color 0nk addtitle (text "↥" color 0ndhs size 1700))

Actually, the Shift key on PC keyboards is doing more things than making letters uppercase, so we call ours the Caps key because it doesn’t do more than giving uppercase letters. I gave it an arrow as a title.

Space Travel

As the tutorial described, the space key may be a Space Travel key, what’s very practical because it makes all the keys around it neighbors. We turn our key into one by

  spacetravel (color 0nk addtitle (color 0ndhs size 1700))

Modifiers

Now we need two modifier keys. First, we define them. This part is needed before the block since the definitions must be created before the keys refer to them.

addmodify (id macron rolls ("aā" "ä" "eē" "iī" "oō" "ȯȱ" "öȫ" "õȭ" "uū" "yȳ"))
addmodify (id caron rolls ("cč" "dḑ" "gģ" "kķ" "lļ" "nņ" "rŗ" "sš" "tț" "zž"))

This way we have a modifier for both the macron and the caron and cedilla (combined). Of course, one would be enough, or we might separate the caron and the cedilla as two modifiers. As we like it.
  To make them work, let’s replace the lines for both keys with modifier buttons:

  modify (roll macron color 0nk addtitle (text "ˉ" color 0ndhs size 1700))

and

  modify (roll caron color 0nk 
addtitle (text "ˇ" color 0ndhs size 1700)
addtitle (text "̧" color 0ndhs size 1700)
)

I did a small trick with the second one. Since it serves for both the caron and the cedilla, I added them both as titles. A button may have as many titles as you wish. I mean it. Once I created one with 7920 titles. Well, loading the file was extremely slow, but it worked.

Finished

Now we don’t need anything more – than a bit of color.
  bestdemo2.jpg
  Here comes the complete code. Feel free to copy it from here and modify it any way.

Click here

»»»»»»