This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 自動的に 0〜9 キーを入力する | |
| UI_SET_EVBIT = 1074025828 | |
| UI_SET_KEYBIT = 1074025829 | |
| UI_DEV_SETUP = 1079792899 | |
| UI_DEV_CREATE = 21761 | |
| EV_KEY = 1 | |
| EV_SYN = 0 | |
| SYN_REPORT = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # キーイベントを表示する | |
| EV_KEY = 1 | |
| EVIOCGRAB = 1074021776 | |
| key_code = {} | |
| IO.readlines('/usr/include/linux/input-event-codes.h').each do |line| | |
| if line.sub(/\/\*.*/, '') =~ /#define\s(KEY_\w+)+\s+(.+)(\/\*.*)?$/ | |
| key, code = $1, $2 | |
| eval("#{key} = #{code}") |
OlderNewer