<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tmtms</author_name>
  <author_url>https://blog.hatena.ne.jp/tmtms/</author_url>
  <blog_title>tmtms のメモ</blog_title>
  <blog_url>https://blog.tmtms.net/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Linux</anon>
  </categories>
  <description>https://blog.tmtms.net/entry/202201/rkremap の続き。 blog.tmtms.net Rkremap.new 時に引数でキーボードデバイスファイルを指定しないといけなかったんだけど、USB や Bluetooth キーボードとかデバイスファイル名がわからない場合に調べるのが面倒なので自動検出するようにしてみた。 入力デバイスの種類の取得 /dev/input/event* に対して ioctl(EVIOCGBIT(0)) をすれば入力デバイスの種類が得られる。 こんな感じ: #include &lt;linux/input.h&gt; #include &lt;stdi…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.tmtms.net%2Fentry%2F202201%2Frkremap2&quot; title=&quot;rkremap: キーボードデバイスの自動検出 - tmtms のメモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-01-15 19:47:59</published>
  <title>rkremap: キーボードデバイスの自動検出</title>
  <type>rich</type>
  <url>https://blog.tmtms.net/entry/202201/rkremap2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
