- Home
-
Training Materials
- Keyboards and Fonts
- Linguistics
- Literacy
- Oral Translation
- Others
- Scripture Use
-
Translation
- Scripture Forge
- Adapt-It
- OmegaT Translation Memory Tool
-
Paratext
- Paratext 9 Materials
- Paratext 8 Course Manuals
- Paratext 7.5 Course and Handbook
- Paratext 7.1 Basic Training
-
Paratext Tutorials
- Basic Editing
- Language Source Tools in Paratext 7.6
- View menu tutorial
- Basic introduction to USFMs
- Tips and Tricks
- Introduction to Using Notes
- Cookbook for Consultants
- Menus vary by active project
- Vérifications
- Help! Paratext has stopped working
- Help, send and receive is not working!
- Bible Modules
- Which Paratext Tool When
- Paratext-FLEx Integration Tutorial
- Back Translations and Interlinearizer
- Send-receive and backing up your data
- ParaTExt 8 Test Projects
- New features in Paratext 8
- Voice Marking Tools
- Animated introduction to Paratext and the stages of a translation project
- Setting up a Paratext Project for Success
- Import TXT or Word DOC Files into Paratext Using SILAS
- Illustrations and Maps
- Advanced Unicode handling
- Create a Custom Python Script in the Paratext Menu
- Create a Custom Scripture Check in the Paratext Menu
-
Translator's Workplace
- Adding BdT Menu to Logos 10
- Adding TW Menu to Logos 10
- Logos Bible Software
-
Translator's Workplace Logos Edition
- Logos 8 Get Started Manual
- Opening Logos
- Opening a Resource
- Navigating a Resource
- Reading Multiple Versions
- Basic Search
- Bible Search
- Looking for Bible Facts
- Using the Home Page
- Using the Passage Guide
- Using the Exegetical Guide
- Using the Bible Word Study Guide
- Using the Sermon Starter Guide
- Using the Topic Guide
- Studying English Words Using the Bible Word Study Guide
- Studying Hebrew and Greek Words Using the Bible Word Study Guide
- Prepare a Bible Lesson Using the Sermon Starter Guide
- Look for Information on a Topic Using the Topic Guide
- Saving Your Workspace or Layout
- Arranging the Windows
- Study a Word Using a Reverse Interlinear
- Study a Word Using a Morphology Search
-
Logos edition
- Logos 8 Get Started Manual
- Set up TW Logos for Success
- Quickstart Guide
- Advanced Tips
- Scrolling with other Translation Programs
- Transition from TWFolio
- Troubleshooting
- External Resources
- Low Bandwidth Installation and Updates
- Turn off Logos internet use when visiting a low bandwidth area
- Logos for Beginners Video-based Training
- Translation Workplace - Folio edition
-
Consultant Training
-
Regional Workshops
- Africa Kenya Workshops(LTCT)
- 2021 Africa Virtual Workshop
- 2020 Africa Nairobi
- 2019 Africa Nairobi
- 2018 Africa Nairobi
- 2017 Africa Nairobi
-
2016 Africa Nairobi
- Course Objectives 2016
- Course Schedule 2016
-
Course Program 2016
- HearThis Session 4
- FLEx 8 Lexicon Edit
- FLEX 8 Using text to build lexicon
- LTCT2016 FLEx - Export
- Scripture App Builder Day 1
- LTCT2016 WeSay New Projct
- Create a new project from a FLEX Lift File
- LTCT2016 Wesay Wordlist
- LTCT2016 WeSay Collaboration
- Scripture App Builder Day 1B
- Scripture App Builder Day 1C
- Scripture App Builder Day1D
- Scripture App Builder Day 2A
- Scripture App Builder Day 2A
- Scripture App Builder Day 2B
- Scripture App Builder Day 2C
- Scripture App Builder Day 2D
- Scripture App Builder Day 3A
- Scripture App Builder Day 3B
- Scripture App Builder Day 3C
- Scripture App Builder Day 3D
- LTCT2016 RegExp
- LTCT2016 Paratext1
- Evening Sessions 2016
- Morning Sharing Time 2016
- Responsibilities 2016
- LTCT 2016 Evaluation
- 2015 Africa Nairobi
- 2014 Africa Nairobi
- 2014 Africa Kara, Togo
- 2013 Africa Nairobi
-
2012 Africa Nairobi
- Course Objectives 2012
- Course Program 2012
- LTCT2012 Friday Jan 20
- LTCT2012 Thursday Jan 19
- LTCT2012 Wednesday Jan 18
- LTCT2012 Tuesday Jan 17
- LTCT2012 Monday jan 16
- LTCT2012 Saturday Jan 14
- LTCT2012 Friday Jan 13
- LTCT2012 Thursday Jan 12
- LTCT2012 Wednesday Jan11
- LTCT2012 Tuesday Jan 10
- LTCT 2012 Monday Jan9
- LTCT2012 Evaluation
- Proactive Software Training
- Teaching a Workshop
-
Paratext for Consultants
- 1 Arranging your workspace
- 2 Consultant notes
- 3 Searching and Dictionaries
- 4 Send and receive
- 5 Taking notes during checking
- 6 Keeping track of Biblical term renderings
- 7 Using the Biblical terms tool
- 8 Seeing history and comparing versions
- 9 Understanding the vernacular text
- 10 Spell checking
- Video lessons
- Paratext Supporters
- Digital Publishing
-
Regional Workshops
- Webinars
- Resources
-
»
- 4 Physical Keyboard Programming
If you have planned your keyboard using the physical keyboard design template, there are some keys that you were able to swap with existing keys with no additional coding required on the Design tab. But you probably won't be able to do everything visually. If your keyboard uses dead keys, or rotas, or combinations to modify output, then you will need to do some coding on the Code tab.
Coding your keyboard
First, open the keyboard file that was created when you created your project. For this example, we will use the Fulfulde keyboard.
On the keyboard tab of your new project page, Keyman has already created the fulfulde.kmn file. Click on it to open the file for editing.
The editor page should look like this:
Details tab
Two features were added by default: the desktop on-screen keyboard, and the touch-optimized keyboard. These show up as additional tabs on the left. If you don't see a tab for On Screen and Touch Layout on the left, then you will need to click the Add button above and add them one at a time.
If you want to add a small icon to identify the keyboard, Keyman will use it in place of its generic icon. Click on the "Add..." button and then select "Icon". Keyman Developer includes a way to edit the icon, or you can edit the icon with another program. For this tutorial, we will use the generic icon.
Working with an existing keyboard? If you are adding touch capability to an existing keyboard, it is good to follow the project creation and then add your existing .kmn file to the project. You will need to add the two features above and to copy the header information from the auto-generated keyboard file to the beginning of your existing file. (Or, alternatively, copy information from your existing .kmn file into the newly created one.)
Layout (for typing keyboard)
On the bottom of the Layout tab, there is a Code tab. This is where you add and modify the code. For Fulfulde, we need to produce the following characters:
ɓɗŋɲƴƁƊŊƝƳ
This is a simple case to start with. There are only 5 special characters, lowercase and uppercase.
We will use the semi-colon as the combining key to create a number of these. A semicolon is usually followed by a space, so if we type a semicolon, followed by another character, we can output whatever we want.
;b > ɓ
We will use the semicolon for four of these, but we have to do something different for the ɲ since we can't use semicolon n to produce both the ŋ and the ɲ. So for the ɲ we will use j + n. We can do this because n never follows a j in the language, and ɲ looks like jn stuck together.
Using the simple method below, we can do this in 10 rules following the keyman rule structure Context + keystroke > output
Simple
begin Unicode > use(main) group(main) using keys ";" + "b" > "ɓ" ";" + "d" > "ɗ" ";" + "n" > "ŋ" ";" + "y" > "ƴ" ";" + "B" > "Ɓ" ";" + "D" > "Ɗ" ";" + "N" > "Ŋ" ";" + "Y" > "Ƴ" "j" + "n" > "ɲ" "j" + "N" > "Ɲ"
This works, and you could stop here. But there is a more efficient way to write this code, which we will now try in the advanced section below.
Advanced (using only three rules)
In Keyman, you can create variables that hold a group of characters. We will create two groups of equal size, and then in the rule, we will tell Keyman to replace a member of the one group with the corresponding member of the other group.
See how the base characters in the store are in the same order as the output characters in the output store. (The store names can be anything that you want.)
begin Unicode > use(main) store(basekey) "bdnyBDNY" store(output_char) "ɓɗŋƴƁƊŊƳ" group(main) using keys ";" + any(basekey) > index(output_char,2) "j" + "n" > "ɲ" "j" + "N" > "Ɲ"
With the stores in place, it takes only one rule to handle most of the special characters!
Let's look at that rule:
';' + any(basekey) > index(output_char,2)
This says, "When there is a semicolon in the context and one of the characters in basekey is typed, output the character at the same index point for the second argument on the left side of the expression."
The number 2 in the index is known as the offset. It is not referring to the second character in the index. Instead, it is saying that the index is based on the second argument on the left.
This example will help clarify. If we wanted to produce a special character every time the base character was typed (swapping a ɓ for every b), then we would remove the semicolon context and write the rule this way:
+ any(basekey) > index(output_char)
Now the index defaults to the first argument on the left side of the >. You don't need to include the offset at the end of the index since 1 is the default.
Try it
You can copy and paste the simple or advanced code above into your Fulfulde keyboard example. Just make sure you don't modify the header statement that is already there!
Test it
Once the code has been added, you can test the keyboard.
- Click the Save button
- Select Keyboard -> Include Debug Information
- Compile the keyboard. F7 or Keyboard -> Compile keyboard
If it compiles well, you will see -
- Select Keyboard -> Test keyboard and a window will open allowing you to type and test the character sequences.
You may need to right-click in the window to set the font to be used.
Keyman Developer has a powerful debugger tool that can help you troubleshoot when your rules are not working as expected. Unfortunately, we don't have materials at this time to explain the use of the debugger, but it works similarly to other compiling environments.
Using stores to do most of the work
You can make two stores the same length, one with the base character and the second with the alternate character, like this:
store (baseChar) "aAáÁcCdDeEgGhHiInNoOóÓpPqQøØsStTuUyY" store (altChar) "áÁäÄçÇđĐéÉġĠħĦíÍñÑóÓǒǑṗṖøØǿǾŝŜŧŦúÚẏẎ"
Then you need a single line of code to tell the keyboard how you want to swap the base character for the alternate character, like this:
any(baseChar) + [K_BKQUOTE] > index(altChar,1)
These 3 lines are all that you need to produce any of the 36 special characters for this language!
For those who don't understand what these lines are doing, the rule basically says, "When you type any of the base characters in the first store, followed by the BackQuote key, output the character in the same sequential position in the second store."
There are various combinations of the rule, but the stores work the same way. You can do this with a deadkey, or an activating keystroke (like semicolon in the earlier example), that gets removed from the output.
Remember, computers don't have a mind of their own. The index() function just counts what number the character is in the first list and outputs the character in the same position in the other list (see chart below for clarity). So, if you change the order of one of the lists, you need to make sure that the characters continue to correspond the way you want them to.
Go Deeper
The Keyboard Ideas and Samples document contains sample code for doing different kinds of rules in Keyman. You can study these examples or study the Keyman language guide.