# Morse Code

**URL:** https://dietpi.com/forum/t/morse-code/3664
**Category:** Requests
**Created:** [14 December 2019 02:56 UTC](https://dietpi.com/forum/t/morse-code/3664 "2019-12-14T02:56:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pucksr](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@pucksr](https://dietpi.com/forum/u/pucksr)
#### Post date: [14 December 2019 02:56 UTC](https://dietpi.com/forum/t/morse-code/3664/1 "2019-12-14T02:56:29Z")

</div>

Any way to make Morse Code output to an LED on a keyboard?

---

<div class="post-metadata">

### Author: ![WarHawk](https://dietpi.com/forum/user_avatar/dietpi.com/warhawk/32/21_2.png) [@WarHawk](https://dietpi.com/forum/u/WarHawk)
#### Post date: [16 December 2019 03:55 UTC](https://dietpi.com/forum/t/morse-code/3664/2 "2019-12-16T03:55:10Z")

</div>

As in make the capslock or scroll lock or some other led on a keyboard flash?

Found something like this  
[https://www.autoitscript.com/forum/topic/84135-flash-numlock-light/?do=findComment&comment=602969](https://www.autoitscript.com/forum/topic/84135-flash-numlock-light/?do=findComment&comment=602969)

This too  
[https://codegolf.stackexchange.com/questions/110974/blink-the-caps-lock](https://codegolf.stackexchange.com/questions/110974/blink-the-caps-lock)

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [26 September 2022 16:06 UTC](https://dietpi.com/forum/t/morse-code/3664/4 "2022-09-26T16:06:09Z")

</div>

Currently, `dietpi-morsecode` uses `/sys/class/leds/led0` and `/sys/class/leds/led1`, on most SBCs power and activity LEDs. Some keyboards use such sysfs device as well, which would then be easy to implement by allowing to define the devices which should be toggled. However, most keyboard LEDs cannot be toggled via sysfs, in which case best would be to allow entering custom “turn on” and “turn off” commands, or flashing the mostly available capslock or numlock LEDs via `setleds` or `numlockx` commands.

If someone has some shell experience, it shouldn’t be too hard to implement new modes here, extending the `Output_On` and `Output_Off` functions: [DietPi/dietpi-morsecode at dev · MichaIng/DietPi · GitHub](https://github.com/MichaIng/DietPi/blob/dev/dietpi/dietpi-morsecode)
