User Tools

Site Tools


guides:keyboard

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
guides:keyboard [2023/12/08 00:43] – Update keyboard search script adminguides:keyboard [2024/01/31 18:06] (current) osnr
Line 11: Line 11:
 ---- ----
  
-In a virtual program paste this program:+Go to the Keyboards page on your Folk's web server:
  
-<code> +http://WHATEVER.local:4273/keyboards
-proc udevadmProperties {device} { +
-    return [exec udevadm info --query=property --name=$device] +
-}+
  
-proc findEventPath {str+{{:guides:pasted:20240131-180636.png?500}}
-    set pattern {DEVNAME=(/dev/input/event\d+)} +
-    set capturedMatch ""+
  
-    if {[regexp -- $pattern $str allMatch capturedMatch]} { +----
-        return true +
-    } else { +
-        return false +
-    } +
-+
- +
-proc isKeyboard {device} { +
-    set properties [udevadmProperties $device] +
-    if {$properties eq ""} { +
-      return false +
-    } +
-    set hasEventPath [findEventPath $properties] +
-    # Check if device is a keyboard and not a mouse +
-    set isKeyboard [string match *ID_INPUT_KEYBOARD=1* $properties] +
-    set isMouse [string match *ID_INPUT_MOUSE=1* $properties] +
-    set isPCI [string match *pci-* $device] +
-    return [expr {$isPCI && $isKeyboard && $hasEventPath}] +
-    # return [expr {$isPCI && $isKeyboard && !$isMouse}] +
-+
- +
-set allDevices [glob -nocomplain /dev/input/by-path/*] +
-set keyboards [list] +
- +
-foreach device $allDevices { +
-    set keyboardCheck [isKeyboard $device] +
-    set notInList [expr {[lsearch -exact $keyboards $device] == -1}] +
-    if {$keyboardCheck && $notInList} { +
-        lappend keyboards $device +
-    } +
-+
- +
-Wish $this is outlined white +
-foreach kb $keyboards { +
-    Wish $this is labelled "$kb" +
-    puts "---\nKeyboard claim: Claim \$this is a keyboard with path $kb\n---\n" +
-+
-</code> +
- +
-When you hit save this will display the connected keyboard's path on the table: +
- +
-{{guides:list_keyboard_folk0.jpeg?700px}}+
  
-and in the journal (''make journal''):+:!: **If no keyboards appear in the list**
  
-<code> +This is known to happen with Bluetooth keyboards. You can put it into ''/dev/input/by-path'' by adding a [[udev-rule|udev rule]]. Then restart Folk and go back to the Keyboards page.
-Nov 13 20:18:45 folk0 make[39865]: --- +
-Nov 13 20:18:45 folk0 make[39865]: Keyboard claim: Claim $this is a keyboard with path /dev/input/by-path/platform-i8042-serio-0-event-kbd +
-Nov 13 20:18:45 folk0 make[39865]: --- +
-</code>+
  
 ---- ----
  
-Put this claim into a new virtual program and hit print. Tape this to the bottom of your keyboard and you now have a keyboard with an attached editor:+With the page open on your computer, type some stuff on your keyboard and see which keyboard entry it appears on.
  
-{{:guides:pasted:20231113-213631.jpeg}}+If you can, put card stock or thick paper into your printer (so the keyboard program will resist crumpling over time). Click Print for that keyboard.
  
 +Tape the printed program to the bottom of your keyboard and you now have a keyboard (which should have an attached editor automatically):
  
 +{{guides:img_3602.jpeg?600px}}
guides/keyboard.1701996230.txt.gz · Last modified: 2023/12/08 00:43 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki