keyboard

Table of Contents

1. keyboard

1.1. why touch typing?

1.3. Key chord vs Key sequences

1.3.1. Sticky Keys

En KDE es Accesibility>Modifier Keys>Sticky Keys>Enable
Si tengo activado xcape con control no funciona (me saca Ctrl+Escape). En emacs remapeo C-ESC a ESC y en vim me funciona sin cambiar nada

1.4. Keyboard International US with AltGr

https://www.choam.eu/altgr-intl/ (esto lo hace más extensible a lenguajes aparte aparte del español)
This layout supports English (of course), Danish, Dutch, Finnish, French, German, Italian, Norwegian, Portugese, Spanish and Swedish
in the sense that all accented characters in these languages are available as one AltGr keystroke.

  • AltGr+[] → «»
  • AltGr+Shift+[] → “”
  • AltGr+90 → ‘’
  • AltGr+5 → €
  • AltGr+Shift+; → °

1.5. Escribir a máquina   project

1.5.1. Los cuantificables

1.5.2. Posiciones no estandar

1.5.2.1. Exepciones a estas reglas (dependencia del contexto)

Mejor no repetir el mismo dedo consecutivamente. Ejemplos de pares de letras con el mismo dedo:

  • ed → normalmente 33 (pero 32 o incluso 43 si van una después de otra)
  • ro → 34, re → 23 (para una misma letra r pulsamos con 3 y con 2 en función del contexto)
  1. How To Type Faster By Cheating (Alt-Fingering) - YouTube

    Avoid using the same finger twice (right fingering) cheating (alternating fingering)

1.5.2.2. Ngram Type
1.5.2.3. Tools & Tips For Learning A New Keyboard Layout (Or How To Type Faster!) - YouTube
  1. Whole word typing with monkeytype
  2. Partial word training with keybr
    1. Good to learn a new layout, introduce keys incrementally
  3. Pure bigram training in ngram type

1.5.4. Ali Abdaal

1.5.4.1. How I Type REALLY Fast (156 Words per Minute)

https://www.youtube.com/watch?v=1ArVtCQqQRE

  1. Better productivity
  2. More creativity (closer to brain speed, type at the rate that you think

-—

1.5.4.2. Ver “How I Type INSANELY Fast - The Best Keyboards for Fast Typing (160 WPM)” en YouTube

1.5.5. Applications

1.5.5.1. Mapa de calor

Hay alguna forma de logear lo que voy escribiendo todos los días (cuidado, también incluiría contraseñas!!)
https://github.com/suurjaak/InputScope
http://patorjk.com/keyboard-layout-analyzer/#/main

1.5.5.2. bajaco/termtype: A Curses-based Python application to practice touch-typing by typing out random Wikipedia articles
1.5.5.3. Test Your Typing Speed in Linux Terminal With Ttyper

1.5.7. https://roosterdan.medium.com/how-to-type-100-words-per-minute-a780fd80fd27

My main mistake was thinking that I just had to spend many hours of practice to achieve this goal but it turns out that training techniques are much more important than pure practice.

  • There are 3 main reasons to improve your typing speed:
    1. Communication overhead: Most jobs involve some form of typed communication and this increases as careers progress. As a senior software engineer, I spend increasing portions of my time writing proposals, design documents, training material, documenting best practices, and responding to peers besides my regular responsibilities.
    2. Cognitive load: Most adults read 250 words per minute and speak 120 words per minute so our thought process is at least as fast as that. Regular typing behavior interrupts our thought process as it’s too intentional rather than an automatic subconscious activity. We switch back and forth between thinking about the real problem to thinking about typing and this interrupts our flow. Reducing the cognitive load provides greater mental clarity and enables us to focus on the problem rather than on typing.
    3. Remote work: The industry is shifting towards more remote positions as a result of the coronavirus pandemic. This trend results in increased typing since writing a message is often more convenient than trying to find a timeslot for a call.
  • Avoid long-term impact
    1. Switched to a mechanical keyboard
      I switched to a mechanical keyboard as my hands would get tired when typing on rubber-membrane keyboards due to the force required to quickly tap keys. Mechanical keyboards are much gentler so I can type all day without fatigue.
    2. Improved posture and keyboard angle
      Propper posture is important as minor discomforts get amplified over time.
    3. Switched to Colemak
  • Principles
    1. Measure your progress often
      1. Perform typing tests on a regular basis and monitor your progress for speed and accuracy.
      2. Don’t restart the test if you start making mistakes. It’s important to capture your progress with mistakes as these techniques will improve your accuracy. Mistakes are a natural part of typing so we want to build a habit of typing accurately and being able to quickly correct mistakes.
      3. I recommend alternating between 10fastfingers.com and monkeytype.com with monkey type configured for 60-second tests.
    2. Take one step at a time
      1. Slow down and focus on techniques as this will speed up your learning and make you reach higher speeds.
      2. Don’t rush through all the techniques at once. Bookmark this page and only go to the next step once you’ve mastered the current step.
      3. Don’t strain while typing. If you’re tense while doing a typing test then you’re rushing too much.
      4. Stay calm and relaxed. I achieved my fastest speeds in a calm state of mind which took me by surprise as it didn’t feel like I was trying hard.
    3. Prefer short and frequent sessions
      1. Building muscle memory requires frequent re-inforced learning. Replace long training sessions with frequent short ones.
      2. Practicing 15 minutes daily is much better than practicing 2 hours on weekends. Short sessions also make it easy to squeeze them into your schedule and turn them into a habit.
      3. Don’t over-practice. Limit sessions to at most 20 minutes with no more than 2 sessions per day.
    4. Pressing keys
      1. quick, light taps instead of pressing/power-hit keys.
    5. Finger placement
      1. Press the space bar with the thumb of your dominant hand.
    6. Dealing with mistakes
      1. Correct the entire word with Ctrl + Backspace even if you only need to fix a single character. This gets you in the habit of typing that word correctly in one go and re-enforces the sequence of keys that led to this error. This is also faster as you won’t need to think about the details of the mistake so it makes it easier to remain in the fast typing flow.
    7. Transition between words
      1. Reset your position by moving your fingers back to the home row before starting the next word.
      2. Some words make you stretch so don’t try to move each finger back to the home row right after each keypress but rather whenever it’s comfortable to do so before starting the next word.
      3. Resetting your position will feel like an extra step at first but it will turn into muscle memory so you’ll forget that you’re doing this after a while.
    8. Mental model
      1. Relative offsets, air-typing
    9. Use a typing trainer to re-enforce the mental model
    10. Don’t look at the keyboard
    11. Use Keybr
    12. Master fundamentals before continuing
      • You type each key with the correct finger.
      • You type without looking at the keyboard.
      • You return your fingers to the home row before starting the next word.
      • Your accuracy is at least 95%. If your accuracy is lower, slow down and increase your accuracy with Keybr as accuracy is very important before continuing.
      • Your individual key speeds stopped increasing the last few days on Keybr.
    13. Change your pace for each word
      Typing all words at the same speed will limit you to the lowest common denominator.
      Slow down for tricky words, speed up for easy words, and type the rest at normal speed. Eventually, more words will seem easy and the repeated speed-ups will increase your rhythm so your speed will drift upwards.
    14. Look at the next word while typing the current word
    15. Reset your typing noise tempo
      1. We build a mental tempo based on the noise of keypresses and this creates a mental block that locks us at the current speed.
      2. Put on headphones once in a while and type for 5 to 10 minutes to push your fingers to their max without being coupled to your current tempo.
    16. Type using rolls
      1. Instead of attempting to type one character at a time, plan for a gesture that hits several keys in one roll.
      2. Replace common portions of words with rolls so that you start typing individual characters and finish typing the word with a roll.
      3. Break words down into rolls and execute the rolls. When you’re executing a roll, prepare your fingers for the next roll since it’s much easier to think about a roll instead of individual keys.
    17. Configure a faster pace for you to chase in Monkey Type
      • 2 carets with different styles; one for your current position and the second will move at a steady pace.
      • Configure the second caret with a custom speed set between 5 to 10 percent faster than your current speed to help increase your pace.

1.5.9. Sacar estadísticas de cómo escribo

1.5.9.1. Parser de key hero
  1. Info HTML

    Color de velocidad

    <span class="quote-acc-6"> </span>
    <span class="quote-acc-1"> </span>
    <span class="quote-dec-2"> </span>
    <span class="quote-dec-6"> </span>
    

    Subrayado

    <span class="quote-valid"> </span> <!-- Esto no lo han puesto en la web, cuando escribes normalmente -->
    <span class="quote-fixed"> </span> <!-- Esto no lo han puesto en la web, cuando tienen que tacharte una palabra -->
    <span class="quote-mistake-case"> </span>
    <span class="quote-mistake-ordering"> </span>
    <span class="quote-mistake-other"> </span>
    <span class="quote-invalid"> </span>
    

    Info de otro error

    title="Misc. error"
    title="Bad case"
    title="Bad ordering"
    
  2. Código

    A veces hay que ponerle for span in soup.find_all(“span”)[1:]:

    1. Desde el portapapeles

      #+begin_src python
      import klembord
      from bs4 import BeautifulSoup
      import pandas as pd

      klembord.init()
      soup = BeautifulSoup(klembord.get_text())

      l = []
      for span in soup.find_all(“span”):
      l.append({“text”: span.text, “class”: span[“class”], “title”: span.get(“title”, pd.NA)})

      df = pd.DataFrame(l)
      df.title = df.title.astype(“string”)
      df[“speed”] = df[“class”].apply(lambda row: list(filter(lambda x: x.find(“acc”) != -1 or x.find(“dec”)
      != -1, row)))
      df.speed = df.speed.apply(lambda row: row[0] if len(row) = 1 else pd.NA) df["valid"] = df["class"].apply(lambda row: list(filter(lambda x: x.find("acc") = -1 and x.find(“dec”
      ) == -1, row))[0]).astype(“string”)
      from datetime import datetime
      df.to_csv(datetime.now().strftime(“%Y%m%d%H%M%S.csv”), index=False)#+end_src

    2. Para exportarlo
    3. Test
      • Pongo Ond en vez de One y no borro
        • Me marca la siguiente palabra (day) mal aunque la escribí bien
        • Parece que si tengo un quote-fixed puedo coger la palabra de en medio como “bien”
      • Escribo day bien y pongo you’; → borro → you’ you’ll
        • Me cuenta como que he puesto mal el ; y como bien la l, una detrás de otra
      • Escribo mal morbid (morbgd) y lo deshago con ctrl+backspace
        • Me cuenta bien morb, mal gd, y bien morbid, justo a continuación
      • Me equivoco y en vez de espacio pongo a, backspace y continúo
        • Como es la primera letra de la palabra siguiente me pone mistake-ordering
      • En achievements hago muchas cosas
1.5.9.2. Sacar tiempos de media (o la distribución de tiempo) en ir de la letra X a la letra Y

Esto con key hero sólamente no se puede sacar, o se saca a baja resolución
Habría que utilizar un keylogger

1.5.10. Ver “Everything you need to know to get from 0 to 200 WPM!” en YouTube

1.5.11. Trucos para aprender un nuevo layout o teclado

Hay dos tipos de ejercicios:

  • Ir a velocidad constante
  • Pararse antes de cada palabra, ejecutar secuencia
    • Puedes mirar al teclado en pantalla para sacar la secuencia

1.6. Teclados mecánicos

1.6.2. Keychron K6: Our In-Depth Review - Switch and Click

1.6.2.1. CANCELLED https://github.com/itspriddle/k6-qmk (Custom keymap on Keychron K6)

https://github.com/SonixQMK/sonix-flasher
https://github.com/CanUnesi/QMK-on-K6
https://www.keychron.com/pages/firmware-for-keychron-k6 → puedo resetear firmware de fábrica si se rompe
Lo ideal sería ponerle también las sticky keys por aquí también, que si paso más de X tiempo sin pulsar nada, se quiten las sticky keys, por si me he equivocado
Tambien si pulso shift dos veces se quita para esta tecla pero no para la siguiente

1.6.4. Keycaps (ABS vs PBT)

https://youtu.be/PkXZLs7zzHk?t=641
ABS start shining before PBT (more noticeable in dark keycaps)
PBT has a rougher texture than ABS
PBT may have long keys warped → soak it in hot water

1.6.4.1. Ver “$200 Keycaps Vs Cheap Keycaps - Why” en YouTube

1.6.6. How to Lube Switches: A Complete Guide - Switch and Click

  • Don’t lube clicky switches, you may convert it into kinda tactile
  • Don’t lube tactile switches, you may convert it into kinda linear
  • Lube linear switches
  • Don’t lube Kailh BOX switches, they cannot be taken apart, and will leak if you lube them

1.7. Ergonomía personal

Estas son cosas que me han pasado a mí, no son aplicables a cualquier otra persona y blablabla

  • Me estaba haciendo daño en la mano izquierda en el ordenador personal porque no tenía apoyabrazos, y la giraba demasiado
    Después de comprarme una silla con apoyabrazos ya no me duele
  • Cuando empecé a aprender a mecanografiar y no tenía i3 configurado, utilizaba Alt+Tab para cambiar de aplicación, pero me dolía la mano porque lo intentaba hacer en la posición de reposo (con pulgar y meñique izq)
    Encuentro que es mejor utilizar atajos como Ctrl+;, con ambos meñiques (o cualquier otra tecla en la fila central), o si usas Alt+Tab tienes que sacar la mano de la posición de reposo (pulgar y corazón o índice)

1.8. Atajos de teclados comunes

Hacer una lista de atajos de teclados que quiero juntar (KDE permite ahora acordes)

1.8.1. Lista de atajos

  • Navegación global hacia atrás y delante con c-o, c-i

1.8.2. Apuntar todos los atajos de teclados para ver conflictos

KDE tiene apuntados como los generales
Luego hay algunos como los de Ctrl+/ para comentarios que comparten Jupyter y VSCode y DBeaver por ejemplo

1.8.3. okular

  • se puede poner gt, gT para cambiar de tab !!
  • j,k para scroll

1.8.4. Essential Keyboard Shortcuts

1.8.5. Atajos de teclado evolution

a
archivar
jk
moverse entre correos (sólo funciona con correos)
C-g
buscar carpeta
F6
Cambiar focus entre distintos paneles

1.9. System-wide shortcuts with Hyper/Meh

Hyper is Ctrl+Shift+Alt+Win/Cmd, while Meh is Ctrl+Shift+Alt. No sane application on your machine uses these, which means you get free system-wide shortcuts.
Downside is there is no way to type them in a non-custom keyboard

1.10. Learn shortcuts and commands | ShortcutFoo

Keyboard shortcuts kata game ($8/month)

1.12. Configurar kmonad   project hold_20230330

1.12.2. Cómo hacer los mapeos que tengo en ortolineales?   project hold_20230330 someday_20230330

Una opción es utilizar teclados JIS con teclas extra en el espacio
Hacer SPC+ALT y SPC+ALTGR como RAISE y LOWER
Para tener los mapeos que tengo en los teclados ortolineales

1.12.3. Key Remapping in Linux — 2021 Edition | by Duane Johnson | Medium

1.12.3.1. mooz/xkeysnail: Yet another keyboard remapping tool for X environment
1.12.3.2. rbreaves/kinto: Mac-style shortcut keys for Linux & Windows.
1.12.3.3. k0kubun/xremap: Dynamic key remapper for X11 and Wayland
1.12.3.4. houmain/keymapper: A cross-platform context-aware key remapper.

https://github.com/houmain/keymapper/

sudo tar xf keymapper-1.9.0-Linux.tar.gz --strip-components=1

1.12.4. DONE Hacer escape con jk únicamente

Ahora mismo necesito pulsar una tecla extra aparte de jk (vale cualquiera salvo justo jk, por ejemplo jk+Ctrl)

1.12.5. Enviar j/k cuando pulso dos teclas a la vez y la segunda no es una j/k   project hold_20230330 hold_20230330

tap-hold-next: combine 2 buttons, one for when the button is tapped and one for when it is held. The decision of what to execute is based upon whether the next button is the buttons own release or not. Also switch to hold after a period of time.
Me funciona si sustituyo todas las teclas por tap-hold-next, pero entonces tengo el problema de que entre ellas se estorban
Si pulso “la” manteniendo las dos teclas a la vez, escribe “al” porque lanza la l cuando suelto la tecla l, no justo antes de pulsar a
Se me ocurre hacer un echo de la letra que quieres enviar a un archivo conocido y luego leerla de ahí, porque cada letra que pulses tiene que conocer la anterior
!CUIDADO porque esto es un keylogger!

1.12.6. Evitar que TAB + j no envíe el TAB   project hold_20230330 hold_20230330

Quizás relacionado con lo anterior, cuando hago X[j|k] sólamente me saca la X

1.12.7. DONE Configurar Ctrl+Click Ctrl+Scroll, Shift+Click

https://github.com/kmonad/kmonad/issues/542

slc (tap-hold 50 (around-next-timeout 500 lctl XX) lctl)
  1. Reducing the timeout of tap-hold improves the snappiness of some shortcuts (Alt+1, Alt+2 etc) so that for example (tap-hold 50 (around-next-timeout 500 lctl XX) lctl) is a better solution. WIth a timeout of 1000ms, sometimes I had to wait 1s until these combinations were pressed
  2. When pressing combos such as Ctrl+Alt+V one has to release first the non-modifier key (the V in this case), otherwise Ctrl+V or Alt+V is sent instead, depending on the key release order.

1.12.8. DONE Evitar que se dispare esc con una tecla que no sea jk

Si por ejemplo hago ck y pulso c antes de soltar k se activa ESC (no es una regresión, ya estaba antes ese comportamiento)
tap-next: combine 2 buttons, one for when the button is tapped and one for when it is held. The decision of what to execute is based upon whether the next button is the buttons own release or not.
tap-hold-next: a combination of tap-next and tap-hold: like tap-next, but also switch to hold after a period of time.

1.12.9. DONE Permitir mantener jk en kmonad

Lo utilizo mucho para scroll, puede ser simplemente un timeout
También cuando escribo rápido, quiero que sea lo más parecido a enviar la tecla cuando se pulsa, no cuando se suelta. Por ejemplo bajo → baoj porque pulso antes la o que soltar la j

1.13. QMK en Contra   project hold_20230330

1.13.1. QMK Configurator

1.13.1.1. Cómo convertir de keymap.json a keymap.c

https://jhelvy.shinyapps.io/qmkjsonconverter/

qmk json2c contra_keymap3.json

1.13.2. QMK Firmware

python3 -m pip install --user qmk
qmk setup
sudo cp /home/julian/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/
qmk compile -kb clueboard/66/rev3 -km default # Para comprobar que funciona
qmk list-keyboards | grep contra
qmk config user.keyboard=contra
cd /home/julian/qmk_firmware
make contra:dana
qmk flash -kb contra -km dana contra_keymap1.json # Esto te lo flashea y ya está, no hace falta compilar
qmk config user.keymap=lytex
qmk new-keymap

https://docs.qmk.fm/#/newbs_flashing
Unplug your keyboard, hold down the Spacebar and B at the same time, plug in your keyboard and wait a second before releasing the keys → esta funciona

1.13.4. Cómo utilizar SEND_STRING con modificadores y demás

1.13.5. Poner keylogger para sacar lo que hago al escribir   project hold_20230330 someday_20230330

https://github.com/qmk/qmk_firmware/issues/714
Idealmente con una timestamp o algo así para que pueda decir cuándo pasa

1.13.6. Arreglar los casos en los que se activa la capa de NUM sin querer   project hold_20230330 someday_20230330

Por ejemplo si bloqueo num y pulso shift para una sóla tecla, se vuelve al teclado normal cuando debería seguir en num
No he encontrado una función equivalente a get_oneshot_locked_mods() para layers (get_oneshot_locked_layer() no existe)
Esto tiene pinta de que me voy a tener que ir a cosas de tap dance, por ejemplo defnir otro valor más para cuando se bloquea num, poner un valor 0 de custom_shift_num

Lo que sucede a nivel de estados es que si hago NUM SHIFT (espera mucho tiempo) a, entonces se queda puesta la capa de números porque se queda custom_shift_num = 1 y nunca llega a ponerse a 2
Le puedo poner simplemente un timeout a esto, ahora que ya sé gestionar los timeouts. El limite de tiempo es 500ms, que lo tengo definido en config.h
Tengo que hacerlo sin que fastidie escribir 12345

1.13.7. Investigar en profundidad sobre máquinas de estados   project hold_20230330 learn indepth someday_20230330

https://gameprogrammingpatterns.com/state.html
ejemplos de máquina de estados, puede estar interesante de ver para lo de los teclados
Otra opción es hacerlo declarativo → Para implementar yield en C recomienda utilizar ensamblador para acceder al stack https://en.wikipedia.org/wiki/Coroutine#C
O si implementar corutinas es mucho jaleo, se puede también utilizar el patrón que dice de constructor() → onUpdate() → dispose(), pero trabajando con funciones call/cleanup

1.13.8. Configurar tap hold en vez de double tap   project hold_20230330 someday_20230330

El double tap al final no lo utilizas, aunque el mínimo teórico en el que te empieza a compensar es 4 pulsaciones, luego no se suele hacer, se hace más mantener (sobre todo si tienes que pulsar muchas veces la misma tecla como C-r)
Si lo mantengo más de X milisegundos y no pulso ninguna otra tecla, se considera hold y activa la capa
Si estoy pulsando C-r todo el rato no quiero que me lo bloquee y haga cosas raras

1.13.9. Hacer que la tecla de la derecha resetee todo   project hold_20230330 maybe_20230330

Me está dando algunos errores NAV, la segunda vez no funciona y te saca jk directamente, y tengo que desconectar/conectar
Si lo consigo arreglar no hace falta, parece que ya lo arreglé (no reseteaba a 0 custom_shift_num después de comprobar si estaba a 2 y aplicar el reseteo de one shot layer)
Aún así me sigue dando de vez en cuando
Que quite todos los mods bloquedos, resetee a 0 custom_shift_num y cambie a capa qwerty

1.13.10. OneShot Chaining   project hold_20230330 maybe_20230330

Funciona siempre si primero hago el OSM (primero pongo el modificador) y luego OSL (selecciona una capa), pero no si lo hago al revés

1.13.10.1. One shot para número + win/alt   project hold_20230330 maybe_20230330 maybe_20230330

Para poder navegar cómodamente a distintos sitios, con i3 utilizo win y alt es bastante común en aplicaciones

1.13.10.2. One shot para Nav + Shift (Y quizás para Ctrl)   project hold_20230330 maybe_20230330 maybe_20230330

El caso más típico es Shift + Nav + ’ para Shift + Enter
Si hago One Shot ctrl entonces tendría sentido hacer One Shot con Nav + Ctrl también

1.13.10.3. Poner Ctrl como one shot también / Fallos de esc   project hold_20230330 maybe_20230330 maybe_20230330

ESC podría ser mantenido, en ese caso, pero entonces probablemente necesite una config ya de kmonad para no liarme, o hacer un timeout para que si no pulso una tecla en menos de x(~500) ms, entonces se asume que es un esc
La verdad es que en general me molesta a veces el esc cuando quiero hacer alguna combinación de teclado con ctrl
Para pulsar Ctrl+1 por ejemplo me puse Ctrl/Esc en m, aunque podría remapear la tecla da abajo del todo como Ctrl cuando estoy en la capa de NUM
Puedo remapear jk a escape, para no tener que hacerlo en la aplicación que sea
https://docs.qmk.fm/#/feature_combo → esto lo define de manera más sencilla, jk → ESC
https://www.reddit.com/r/olkb/comments/cce4oj/qmk_possible_to_disable_combos_on_a_layer/ pone jk → ESC, df → :

1.13.11. Poner un hold que sea si pulso la tecla más de x ms se bloquea?   project hold_20230330 maybe_20230330

Es más natural que lo que tengo ahora con doble tap

1.13.12. Hacer una config de teclado con vim   hold_20230330 project maybe_20230330

Y si el propio teclado implementase (neo)vim ? Me haría falta un micro absurdamente potente para esto y sería hacerselo de cero. Lo mismo una Raspberry Pi o placa similar con pantalla y usb es lo que tiene más sentido, estilo firenvim. Copiar el texto de seleccionado al portapapeles, y que el hecho de pulsar Ctrl+C abriese un neovim con el texto seleccionado. Luego al guardar y salir del editor, te guarda el texto y lo pega en la selección
Otra alternativa es utilizar firenvim directamente, en javascript, que ya implementa todo esto
https://github.com/qmk/qmk_firmware/blob/master/docs/compatible_microcontrollers.md
Aquí dice que cualquier ARM que soporte ChibiOS y se puede instalar en la Raspberry Pi:
https://www.stevebate.net/chibios-rpi/GettingStarted.html
Idealmente instalar algo con neovim, aunque ChibiOS ya no valdría, haría falta algo más potente
Lo mismo simplemente actuar el USB de la pi como esclavo y listo
Así te valdría para cualqier entrada de texto y si está configurado para teclado español te valdría para cualquier ordenador de cualquier persona
Lo complicado es copiar el texto del ordenador a la raspberrypi

1.13.12.1. Complete PC in a Mechanical Keyboard! Retro Concept, Modern Hardware. - YouTube

Se pilla un Framework laptop y se hace un teclado con la CPU

1.13.12.2. Gadgetoid/pi400kb: Raw HID keyboard forwarder to turn the Pi 400 into a USB keyboard

Las únicas que pueden funcionar como Human Interface Device (USB) son la Pi4 y la Pi Zero y la Pi Pico
y por este issue, también la 3A+

https://github.com/Gadgetoid/pi400kb/issues/26 → parece que este quiere hacerlo también

1.13.12.3. Utilizar vim en tty

Mejor que una pantalla de baja resolución que va por ahí, lo suyo sería sacar la info por una tty o algo así y que se viese todo por ahí
Cosas como las fuentes extrañas que usa neovim no creo que funcionasen muy bien (unicode y demás por tty puede ser un dolor)
unicode_start es un comando que pone la terminal en un modo más compatible, pero no es suficiente
https://wiki.archlinux.org/title/Fbterm → funciona mejor, con fuentes y demás, aunque le da la vuelta a los colores de nvim
https://wiki.archlinux.org/title/Linux_console#Fonts

The Linux console uses UTF-8 encoding by default, but because the standard VGA-compatible framebuffer is used, a console font is limited to either a standard 256, or 512 glyphs. If the font has more than 256 glyphs, the number of colours is reduced from 16 to 8. In order to assign correct symbol to be displayed to the given Unicode value, a special translation map, often called unimap, is needed. Nowadays most of the console fonts have the unimap built-in, historically it had to be loaded separately.

https://m7i.org/tips/customize-tty-appearance/

1.13.13. Hacer copy paste de un ordenador a otro → guardándolo en el teclado   project hold_20230330 maybe_20230330

Lo complicado es enviar la “selección” por alguna parte, porque no puede guardar la selección del sistema operativo, sino sólamente lo que escribas
Esto probablemente tendría que ir por algún tipo de comunicación USB y que un atajo de teclado lo dispare en i3 por ejemplo (no valdría para copiar desde un ordenador que no sea el mío)

1.13.14. Hacer una config de teclado para mac en español   project hold_20230330 maybe_20230330

Cambian un poco los atajos de teclado

  • Si me conecto a un ordenador con otro sistema operativo distinto no funciona lo que tengo, pero el problema es que no se puede configurar para que no dependa del sistema operativo porque todos hacen cosas raras
  • En mac control izquierdo no sirve para avanzar a una palabra sino que es alt izquierdo, y luego cosas como ~`<>,. también son extrañas

1.13.15. Arreglos de one shot keys   project hold_20230330 maybe_20230330

https://youtu.be/5RN_4PQ0j1A?t=276
Ben Vallack: como hace rolls, le pasa que quiere aplicar el mod a una tecla solamente, incluso si sigue manteniendo el mod porque lo hace muy rápido (básicamente después de pulsar la tecla siempre quieres que se quite a la segunda pulsación)
Puedo poner en cada tecla que no sea un modificador que se quite ese modificador, no sé si es lo que hace Ben, y que cuando pulse una tecla no me haga OSL sino que active esa capa (que es lo que estoy haciendo ahora un poco), es decir, hacerme yo el qmk
https://docs.qmk.fm/#/feature_combo → esto lo define de manera más sencilla

1.13.16. DONE Arreglar mappeo español

Las teclas de \| no funcionan

1.13.17. DONE Pensar como hacer “_

Lo utilizo bastante en vim
En teclado normal es más o menos fácil de utilizar porque tienes que utilizar sólamente el shift izq
Ahora que tengo ya configurado one shot con número + key es fácil

1.13.18. DONE One shot para número + shift

Me tengo que hacer las transiciones que quiero hacer, porque son todas estas:

Combinaciones Number no pulsado Number Pulsado Number One Shot
Shift no pulsado      
Shift Pulsado      
Shift One Shot      

No me funciona porque intenta aplicar el one shot a shift y no hace nada, por ejemplo al revés sí que funciona
Lo que habría que hacer es en la capa de números que el shift vuelva a aplicar el modificador de número durante otra pulsación más
No me ha funcionado:
NUM a SHFT a → 2@
No se desactiva el modo num_shift después de que pulse NUM tecla, debería salir 2A

1.13.19. DONE Hacer una config que vale para teclado español

Cuando el teclado envía ; eso lo interpreta luego el sistema operativo como ñ, lo que puedo hacer es ver la tecla que tengo que enviar para que me saque lo que quiero
Luego en función de algún tipo de variable que me decida si hago una u otra, o más sencillo, hacer mapeos para esas cosas en concreto
Tendría que hacer un mapeo inverso español, luego uno para Shift, otro para AltGr y un último para AltrGr+Shift
Me puedo ahorrar un mapeo si en el qwerty (capa por defecto) pongo un if en cada tecla en función de alguna variable global que puedo cambiar en el teclado, pero no sé cómo se podría hacer

1.13.19.1. Mapeo entre teclado americano y español

https://github.com/qmk/qmk_firmware/tree/master/users/spacebarracecar
Puedo hacer que cuando pulso la tecla ; en mi teclado, no envíe ; que luego se interpreta como ñ sino < que se interpreta como ;

< ;
> :
-
& /
@
_ ?
?? ISO <>
AltGr+2 @
AltGr+3 #
{ SPC ^
^ &
} *
* (
( )
) =
? _
] +
AltGr+[ [
AltGr+] ]
AltGr+’ {
AltGr+\ }
AltGr+4 ~
[ [ | [ SPC `
AltGr+1
AltGr+` \

1.13.20. DONE Cambios de la semana 2022-02-14

  • [ ] Quitar el doble espacio
    No hay una buena manera de activar algo con la doble tecla de espacio y de todas formas no utilizo esa tecla de espacio, me parece (quizás debería?)
    Puedo poner el modificador de la capa 2 que parece más lógico que vaya allí
    Otra opción es mover allí el modificador de la capa 1 y mover el AltGr una tecla a la izq, pero no me convence
  • [ ] Mover la capa 1 una posición a la izquierda (el 1 sobre el ctrl)
    Como cosas buenas, pasa a estar todo como en un teclado convencional
    Tengo que pensar a dónde mover ese Ctrl

1.14. YMD40 / Air40

1.14.1. Posición de los tornillos

Indicado con %

TAB Q W % E R       U I O % P BS
CTRL         F G % H J K L   ;
%         V B   N M         %
SHIFT                           SHIFT

1.15. CANCELLED Atajos de teclado KDE

Ctrl+2
KDE Connect
Ctrl+3
Klipper
Ctrl+4
Notifications
Ctrl+7
Volumen
Ctrl+8
Battery and Brightness
Ctrl+9
Calendar

Conflictan con los atajos de Okular, y con bastantes de hecho

1.16. sudo apt install screenkey

Para enseñar los atajos de teclado que usas

1.17. Alternative Layouts

1.17.1. dvorak

https://www.youtube.com/watch?v=U-cDo4v5m0g
vim is slower in dvorak https://youtu.be/U-cDo4v5m0g?t=252
Parece bueno para no mover tanto los dedos (pasas más tiempo en la fila central, en qwerty saltas entre filas), pero pierde por vim y atajos de teclado

1.17.2. Colemak DH

1.17.2.1. Switching From Qwerty To Colemak DH (via Workman) - YouTube
  • Qwerty was designed to prevent keys from jamming, so frequently used keys are far apart. That means you don’t get the benefit of rolling for the most commonly used combinations
    (rolling = using 2 nearby fingers in rapid sequence)
1.17.2.3. https://www.reddit.com/r/Colemak/comments/j9pxcb/colemak_dh_vs_workman/

Workman kinda recognized the problem and came up with a solution. Mod DH took those concepts presented by Workman and incorporated the core ideas in to Colemak.
I personally went from QWERTY to Colemak to Workman to Colemak DHm.
The thing is, Workman’s solution came at the expense of introducing a bunch of SFBs (same finger bigrams). They acknowledge this but say that it isn’t really a problem. Personally, though, Workman’s SFBs made it very uncomfortable after reaching normal typing speeds.
Colemak DH takes the ideas that Workman introduced and applies them to Colemak but also maintained the very good low level of SFBs of original Colemak. For me, Colemak DH is way more comfortable than both Workman and original Colemak.
Basically, Workman recognized the problem and created, essentially, a prototype. Colemak DH then used those ideas to make a genuinely good layout.

1.17.2.6. Differences with qwerty
e
f
r
p
t
b
y
j
u
l
i
u
o
y
p
;
r
s
d
s
f
t
h
m
j
n
k
e
l
i
;
o
(left pinkie)
z
z
x
x
c
c
d
b
\ or None
n
k
m
h
1.17.2.7. Differences with qwerty (inverse)
f
e
p
r
b
t
j
y
l
u
u
i
y
o
;
p
s
r
s
d
t
f
m
h
n
j
e
k
i
l
o
;
z
(left pinkie)
x
z
c
x
d
c
\ or None
b
k
n
h
m
1.17.2.8. Aprender Colemak DH en keybr

1.17.6. Atajos de teclado con QWERTY

Para que por ejemplo Ctrl+C esté en el mismo sitio, se puede hacer una capa que cuando pulsas Ctrl te cambie a qwerty sólo para la siguiente pulsación, lo mismo para Alt y demás

1.17.7. Lista de cosas que dependen de qwerty

Y que no están configuradas para utilizar las flechas por ejemplo

  • nvim-tree.lua chars = "ASDFJKL;GHQWERUIOPTYZXCNM,.VB",
  • Los atajos de i3 hjkl, pero se pueden poner con flechas sin problema
  • Los atajos de i3 Ctrl+;, Ctrl+’
  • Los atajos de

1.17.8. vim alternative layout

1.18. AutoKey: AutoHotKey on Linux

1.19. Estenotipia / Stenography   learn

1.19.1. Cursos que he ido siguiendo

1.19.3. How to Learn Steno

  1. Keep your theory close
    1. Setup a capture system for every new word (review and add to your current dictionary seamlessly)
    2. Test yourself trying to write a word, look it up on your phone if not sure
  2. Label everyting: household items, like when you’re learning a language
  3. Use outlines (??)
  4. Teach someone the basics
    1. Blog post, or actually showing it to someone
    2. Questions from your learners will expose your blind spots
  5. Keep your practice interesting
  6. Build your personal dictionary
    1. you can revisit strokes that weren’t in the best taste after you’ve learned more
    2. not letting yourself explore your intuitions and fail early stunts the brain’s curiosity and neurological pathway development
  7. Leave everything running
    1. Make the habit of practicing as frictionless as possible to maximize the number of opportunities of practice
  8. Air steno
    1. steno people’s names as you meet them
    2. try stenoing words in the conversation you’re listening to
    3. steno in bed as you drift to sleep
    4. steno on the bus while you listen to a podcast
    5. i found that some of my biggest speed increases in plateau breakings were after sessions where i wasn’t writing on my machine
  9. learn party tricks and fun stuff
    1. don’t practice if you feel bored don’t create a negative association between your steno machine and your mood

1.19.9. Anki Cards Steno

1.19.10. Steno QMK

1.19.10.1. Steno encima de qwerty

https://noahfrederick.com/log/colemak-steno-hybrid-in-qmk
Lo aplica directamente sobre el teclado, ya que no vas a pulsar nunca dos teclas a la vez (?)
https://www.reddit.com/r/AutoHotkey/comments/rdynrn/i_built_out_a_stenotypy_true_qwerty_steno/ → esto con autohotkeys

1.19.11. Steno + Programming

1.19.11.1. Steno + neovim / Steno + Emacs

Ideally a hook, when you switch to insert mode, that triggers steno mode, and when you enter another mode (except maybe command mode) then it switches back to qwerty keyboard

1.19.12. Cómo escribir cosas fuera de diccionario?

there are times when you won’t be able to write a word with a steno machine. This can happen because:

  • You don’t know your theory fully
  • You don’t know the brief in your dictionary for that word
  • That word isn’t in your dictionary

https://www.artofchording.com/sounds/fingerspelling.html#fingerspelling-alphabet

1.19.13. Utilizar diccionarios ya hechos o hacer el tuyo?

Si vas a hacer diccionarios, puede ser interesante empezar con un lenguaje de programación que es mucho más sencillo
https://www.artofchording.com/introduction/theories-and-dictionaries.html
Imagino que para crear un diccionario podrás partir de los N-gramas del lenguaje en cuestión y hacer abreviaciones para ellos, y luego poner un atajo para que cada vez que escribes algo te lo añada a tu diccionario de manera cómoda para pillar el hábito de añadir abrevs a tu diccionario
Parece que hay un tradeoff entre velocidad y facilidad de aprendizaje:
https://www.reddit.com/r/stenography/comments/bxks6d/comment/eq7pn99/
https://github.com/skimrey/stenotypy/blob/main/Spellbook.ahk → ejemplo de diccionario para autohotkeys

1.19.14. Otras alternativas

1.19.14.2. FrogPad - Wikipedia
1.19.14.3. Learn Palantype!
1.19.14.4. Penti → Para Móvil/Tablet

1.19.15. using programming to save ancient writing method - YouTube

Útil para ver cómo funciona la tokenización, por ejemplo br no es b+r sino que es un símbolo propio
Al estilo de ae → æ, oe → œ

1.20. Scientific Studies

The model of the user performance for the present research can be divided into two cost components.
One component is the cost associated with cognitive processing, and the other is the cost associated with motor movements.
Keeping with past research by Rumelhart and Norman (1982) the cost for cognitive processing is not modeled.
This is because one assumes that the cognitive processing requires less time, and is in parallel with the motor activity.

A quick analysis of the Fitts’ Law formula reveals how this finding occurred.
Any effect due to a change in movement distance is reduced in magnitude for the performance evaluation by first taking the base two logarithm of the number, then multiplying the result by a small number (0.08), and finally swamping any remaining effect by adding the result to a relatively large constant (1.0).

1.20.1. Investigaciones mías

Basándome en la ley de Fitt, si sumamos el tiempo de cada pulsación por el número de pulsaciones:

\begin{equation*} T = \sum_{i=1}^N t_i = \sum_{i=1}^N a + b\log_2{\frac{D_i}{\sqrt{2\pi e (\sigma^2 - \sigma_a^2)}}} = Na - \frac{Nb}{2}\log_2[ 2\pi e (\sigma^2 - \sigma_a^2) ] + b\sum_{i=1}^N \log_2( D_i ) \end{equation*}

\(\sigma\) es la desviación de la precisión con la que eliges moverte (tradeoff entre velocidad y precisión) y \(\sigma_a\) es la desviación de la precisión propia del movimiento (imprecisiones de la mano/dedo). Como esta imprecisión es absoluta, se resta porque nos interesa el error relativo
\(a \sim 1, b \sim 0.08\)

Así de primeras el término más grande parece que va a ser el \(Na\), es decir, que importa más pulsar menos teclas que pulsar el mismo número de teclas más eficientemente (esto lo veo como evidencia de que la Estenografía sí que aporta mejora de tiempo vs layout alternativo)

Ahora me queda saber qué distribución siguen las \(D_i\), la distancia entre pares de letras (digrafos); hay que tener en cuenta cómo de comunes son estos digrafos en un lenguaje concreto. Por ejemplo en inglés:

  • https://jasmcole.com/2017/06/04/swype-right/
    En este artículo se ve que siguen una distribución normal, más o menos \(\mu_k = 3, \sigma_k \sim 2/3\), pero esto sólo es válido si pulsas con un dedo
    Habría que modificar el notebook para que calculase la distancia respecto de la fila central

1.20.2. Carpalx también utiliza simmulated annealing pero con más cosas

Author: Julian Lopez Carballal

Created: 2024-09-16 Mon 06:01