Thuc notes - Setup foot switch keyboard pedal

It’s a pedal that’s used as keyboard to control PC/Mac.

Pedal model is used in this post Olympus Foot Switch RS28H

Why choose this model:

  • Easy to buy from Sweden
  • Support MacOS officially
  • Easy to setup switch with custom key or shortcuts

How can setup it

The Foot Switch Configuration Tool is management tool that allows you manage your pedal or configuration it.

In time I write this note, it’s v100 Windows and v101 MacOS, you can download it from following links:

Plug Olympus Foot Switch RS28H to your machine, open FTSW tool, setup

FTSW tool

  1. Pedal model
  2. Product serial
  3. Setting’s tab and test pedal
  4. Setting’s template
  5. Configure pedal’s swich with keys and food’s behaviour
  6. Save and apply it to pedal

Direct mapping

Map pedal to direct key or shortcut keys.

                                   ┌─────────────────────┐
                                   │ Browser/Document    │
┌────────┐                         │                     │
│        │                         │         ▲           │
│ Pedal  │────Page Up/Down────────>│         │           │
│        │                         │         │           │
└────────┘                         │         ▼           │
                                   │                     │
                                   └─────────────────────┘
                                   ┌─────────────────────┐
                                   │     Document        │
┌────────┐                         │                     │
│        │                         │  ████████████████   │
│ Pedal  │──────Ctrl + A──────────>│  ███Select All███   │
│        │                         │  ████████████████   │
└────────┘                         │                     │
                                   │                     │
                                   └─────────────────────┘

FTSW settup

Map to editor’s action

Map pedal to a shortcut. The editor maps the shortcut to editor' action.

                                    ┌───────────────────────────────┐
                                    │ VIM                           │
                                    │                               │
                                    │                               │
                                    │                               │
┌────────┐                          ├────────────────────┐          │
│        │                          │     Converter      │          │
│ Pedal  │────Ctrl + Shift + B─────>│ Shortcut -> Action │          │
│        │                          │                    │          │
└────────┘                          ├────────────────────┘          │
                                    │          │                    │
                                    │          └─────┐              │
                                    │                V              │
                                    │     ┌────────────────────┐    │
                                    │     │     Save file      │    │
                                    │     └────────────────────┘    │
                                    │                               │
                                    │                               │
                                    │                               │
                                    └───────────────────────────────┘

FTSW settup action

VIM

1
2
3
" ~/.vimrc

map <C-S-b> :w<CR><Esc>

Sublime

1
2
3
[
	{"keys": ["ctrl+shift+b"], "command": "insert_snippet", "args": {"contents": "\nif err != nil {\n\n}"}}
]

FTSW settup snippet

Map to code snippet

Map pedal to shortcut. The editor maps shortcut to plugin.

                                    ┌───────────────────────────────┐
                                    │ VIM                           │
                                    │                               │
                                    │                               │
                                    │                               │
┌────────┐                          ├────────────────────┐          │
│        │                          │     Converter      │          │
│ Pedal  │────Ctrl + Shift + B─────>│Shortcut -> Snippet │          │
│        │                          │                    │          │
└────────┘                          ├────────────────────┘          │
                                    │          │                    │
                                    │          └─────┐              │
                                    │                V              │
                                    │     ┌────────────────────┐    │
                                    │     │fmt.Println('Hello')│    │
                                    │     └────────────────────┘    │
                                    │                               │
                                    │                               │
                                    │                               │
                                    └───────────────────────────────┘

FTSW settup snippet

VIM

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
" ~/.vimrc

command! GolangErrorSnippet call Ignore()
function! Ignore()
   normal! o
   normal! iif err != nil {
   normal! o	abc
   normal! o}
endfunction

map <C-S-b> :GolangErrorSnippet<CR><Esc>

Sublime

1
2
3
[
	{"keys": ["ctrl+shift+b"], "command": "insert_snippet", "args": {"contents": "\nif err != nil {\n\n}"}}
]

FTSW settup snippet