{"id":18544085,"url":"https://github.com/swagdevops/ir-proxy","last_synced_at":"2025-05-15T05:31:06.041Z","repository":{"id":51126191,"uuid":"198377247","full_name":"SwagDevOps/ir-proxy","owner":"SwagDevOps","description":"Proxy for ir-keytable","archived":false,"fork":false,"pushed_at":"2024-04-15T14:26:46.000Z","size":309,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-22T14:47:28.671Z","etag":null,"topics":["ir-keytable","rc6"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SwagDevOps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-23T07:33:50.000Z","updated_at":"2024-04-15T14:03:46.000Z","dependencies_parsed_at":"2024-04-15T09:00:20.257Z","dependency_job_id":"4e31cdc0-3274-444b-b991-1a7e74820bbf","html_url":"https://github.com/SwagDevOps/ir-proxy","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwagDevOps%2Fir-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwagDevOps%2Fir-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwagDevOps%2Fir-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwagDevOps%2Fir-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwagDevOps","download_url":"https://codeload.github.com/SwagDevOps/ir-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254281735,"owners_count":22045010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ir-keytable","rc6"],"created_at":"2024-11-06T20:15:20.576Z","updated_at":"2025-05-15T05:31:06.019Z","avatar_url":"https://github.com/SwagDevOps.png","language":"Ruby","readme":"\u003c!-- ( vim: set fenc=utf-8 spell spl=en: ) --\u003e\n\n# Proxy for ``ir-keytable``\n\n``ir-proxy`` can be used on a [pipeline][wikipedia:pipeline] to process\n``ir-keytable`` output and propagate key events.\n``ir-proxy`` uses adapters (``xdotool``) to send key events to the [display server][wikipedia:xorg].\n``ir-proxy`` conforms to the [XDG Base Directory][freedesktop:basedir-spec].\nAs a result, [configuration file][file:config] file is located:\n\n```sh\n${XDG_CONFIG_HOME:-~/.config}/ir-proxy/config.yml\n```\n\n## Synopsys\n\n```\nCommands:\n  ir-proxy config          # Display config\n  ir-proxy help [COMMAND]  # Describe available commands or one specific command\n  ir-proxy pipe            # React to STDIN events\n  ir-proxy sample          # Print samples on STDOUT\n```\n\n## Sample commands\n\n```sh\nsudo socat - EXEC:'ir-keytable -tc -D 850 -P 250',pty,setsid,ctty | sudo -u $(whoami) ir-proxy pipe\n```\n\n```sh\nsudo socat - EXEC:'ir-keytable -tc',pty | sudo -u $(whoami) ir-proxy pipe\n```\n\n```sh\nsudo socat - EXEC:'ir-keytable -tc',pty | sudo -u $(whoami) ir-proxy pipe --config /etc/ir-proxy/config.yml\n```\n\n### Testing\n\n```sh\nbundle install --standalone\nsudo socat - EXEC:'ir-keytable -tc',pty | ruby bin/ir-proxy pipe --config config.sample.yml\n```\n\n## Install ``production`` only\n\n```shell\nbundle install --standalone --without development test doc repl\n```\n\n## Sample ``systemd`` service\n\n```ini\n# /lib/systemd/system/ir-proxy.service\n[Unit]\nDescription=Remote support service\nPartOf=graphical-session.target\nConditionPathExists=/dev/tty20\n\n[Service]\nType=simple\nExecStart=/usr/local/bin/_ir-proxy user\nStandardInput=tty-fail\nStandardOutput=tty\nUser=root\nTTYVHangup=yes\nTTYPath=/dev/tty20\nTTYReset=yes\nRemainAfterExit=false\nRestart=always\nRestartSec=1s\n\n[Install]\nWantedBy=default.target\n```\n\n```sh\n#!/usr/bin/env sh\n# /usr/local/bin/_ir-proxy\n\nexport DISPLAY=${2:-:0}\nset -eu\nX_USER=${1}\nLOGFILE=/var/log/ir-proxy.log\nCONFIG=/etc/ir-proxy/config.yml\nexport XAUTHORITY=$(getent passwd \"${X_USER}\" | cut -d: -f6)/.Xauthority\n\ntouch \"${LOGFILE}\"\nchown \"${X_USER}\" \"${LOGFILE}\"\n(socat - EXEC:'ir-keytable -tc',pty,setsid,ctty | gosu \"${X_USER}\" -- ir-proxy pipe --config \"${CONFIG}\") \u003e \"${LOGFILE}\" 2\u003e\u00261\n```\n\n```sh\nsudo systemctl enable ir-proxy.service\n```\n\n## Sample ``kodi`` keymap\n\n```xml\n\u003c!-- ~/.kodi/userdata/keymaps/ir-proxy.xml --\u003e\n\u003ckeymap\u003e\n  \u003cglobal\u003e\n    \u003ckeyboard\u003e\n      \u003cf12\u003eActivateWindow(Home)\u003c/f12\u003e\n      \u003cpower\u003eActivateWindow(ShutdownMenu)\u003c/power\u003e\n    \u003c/keyboard\u003e\n  \u003c/global\u003e\n\u003c/keymap\u003e\n```\n\n## Disable poweroff button\n\nDisable poweroff button (power-key is handled by kodi)\u003cbr /\u003e\nedit ``/etc/systemd/logind.conf`` file\n\n```ini\nHandlePowerKey=ignore\n```\n\n## Extract available keys to a YAML syntax\n\n```sh\ngrep -Eo 'KEY_.*' /lib/udev/rc_keymaps/rc6_mce.toml | perl -pe 's/\\s+=\\s+/: /g' | perl -pe 's/:\\s+\"KEY_/: \"/'\n```\n\n## Resources\n\n* [ir-keytable on the Orange Pi Zero](https://www.sigmdel.ca/michel/ha/opi/ir_03_en.html)\n* [List of Keysyms Recognised by Xmodmap](http://wiki.linuxquestions.org/wiki/List_of_Keysyms_Recognised_by_Xmodmap)\n* [XF86 keyboard symbols](http://wiki.linuxquestions.org/wiki/XF86_keyboard_symbols)\n* [Keyboard controls - Official Kodi Wiki][kodi.wiki/keyboard_controls]\n* [Remote controller tables — The Linux Kernel documentation](https://www.kernel.org/doc/html/v4.14/media/uapi/rc/rc-tables.html)\n* [xdotool | Linux man page](http://linuxcommandlibrary.com/man/xdotool.html)\n* [xbmc-system/keymaps/keyboard.xml][xbmc/system/keymaps/keyboard]\n* [xdotool list of key codes][wikis/xdotool-list-of-key-codes]\n* [XF86 keyboard symbols][wikis/XF86_keyboard_symbols]\n* [List of built-in functions - Official Kodi Wiki][kodi.wiki/built-in_functions]\n* [Window IDs - Official Kodi Wiki][kodi.wiki/window_IDs]\n* [Raspberry Pi4 and kodi as mediacenter](https://medium.com/@stas.berkov/raspberry-pi4-and-kodi-as-mediacenter-b3a2d8b44759)\n\n\u003c!-- hyeprlinks --\u003e\n\n[file:config]: ./samples/config/config.yml\n\n[wikipedia:pipeline]: https://en.wikipedia.org/wiki/Pipeline_(Unix)\n\n[wikipedia:xorg]: https://en.wikipedia.org/wiki/X.Org_Server\n\n[freedesktop:basedir-spec]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html\n\n[xbmc/system/keymaps/keyboard]: https://fossies.org/linux/xbmc/system/keymaps/keyboard.xml\n\n[wikis/xdotool-list-of-key-codes]: https://gitlab.com/cunidev/gestures/-/wikis/xdotool-list-of-key-codes\n\n[wikis/XF86_keyboard_symbols]: https://wiki.linuxquestions.org/wiki/XF86_keyboard_symbols\n\n[kodi.wiki/keyboard_controls]: https://kodi.wiki/view/Keyboard_controls\n\n[kodi.wiki/built-in_functions]: https://kodi.wiki/view/List_of_built-in_functions\n\n[kodi.wiki/window_IDs]: https://kodi.wiki/view/Window_IDs\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagdevops%2Fir-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswagdevops%2Fir-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagdevops%2Fir-proxy/lists"}