
(progn
(setf factory-key-delivery-frame
(make-gframe 0 0 1 1 nil 0 nil nil nil nil nil nil nil nil nil)))

(defun factory-key-delivery-frame-hook (key on-off)
(cond ((eq on-off 'key-press)
(write-back-bytes key-press 8 (symbol-value key) last-key-code))
((eq on-off 'key-release)
(write-back-bytes key-release 8 (symbol-value key) last-key-code))
)
(if (eq on-off 'key-release)
nil
(case key
((TXK_UP TXK_DOWN TXK_RIGHT TXK_LEFT TXK_ENTER
TXK_LEFT_UP TXK_RIGHT_UP TXK_LEFT_DOWN TXK_RIGHT_DOWN
TXK_BLUE TXK_RED TXK_GREEN TXK_YELLOW
FXK_CHG_NETWORK TXK_DIGAINPUT
TXK_NET_TD TXK_NET_BS TXK_NET_CS TXK_NET_CS1 TXK_NET_CS2
TXK_1 TXK_2 TXK_3 TXK_4 TXK_5 TXK_6 TXK_7 TXK_8 TXK_9 TXK_10
TXK_11 TXK_12
TXK_BS01 TXK_BS02 TXK_BS03 TXK_BS04 TXK_BS05 TXK_BS06 TXK_BS07 TXK_BS08
TXK_BS09 TXK_BS10 TXK_BS11 TXK_BS12
TXK_CS01 TXK_CS02 TXK_CS03 TXK_CS04 TXK_CS05 TXK_CS06 TXK_CS07 TXK_CS08
TXK_CS09 TXK_CS10 TXK_CS11 TXK_CS12
TXK_D0 TXK_D1 TXK_D2 TXK_D3 TXK_D4 TXK_D5 TXK_D6 TXK_D7 TXK_D8 TXK_D9
TXK_TD01 TXK_TD02 TXK_TD03 TXK_TD04 TXK_TD05 TXK_TD06 TXK_TD07 TXK_TD08
TXK_TD09 TXK_TD10 TXK_TD11 TXK_TD12
TXK_OFF TXK_OFFSUB TXK_SHARP
TXK_STOP TXK_PAUSE TXK_REW TXK_FF TXK_30SEC_SKIP TXK_TIMEKEEP
TXK_EPG TXK_DISP_MODE TXK_DMODE TXK_CLEAR TXK_VMENU TXK_JIMAKU TXK_REC
TXK_CHANNEL TXK_ASTERISK TXK_CHG_CHAR
TXK_MIC_START TXK_MIC_NRC
TXK_RETURN TXK_AD_CHANGE TXK_SUBMENU TXK_EVENT_INFO TXK_FAVORITE
TXK_MPX TXK_INFO
TXK_SKIPREV TXK_SKIPFWD TXK_FLICKUP TXK_FLICKLEFT TXK_FLICKDOWN
TXK_FLICKRIGHT
TXK_13 TXK_15 TXK_E_RSV
TXK_VOLUP TXK_VOLDOWN TXK_MUTE
)
t)
(otherwise nil)))
)
(defun factory-noaction (f) nil)
(register-frame2 'factory-key-delivery-frame
nil
LOCAL_OSD
PRIO_APPLI
#'factory-noaction
#'factory-noaction
#'factory-key-delivery-frame-hook
#'factory-noaction
nil)
(map-frame 'factory-key-delivery-frame)
