require '_h2ph_pre.ph';

unless(defined(&KEYSYM_NOREPEAT)) {
    sub KEYSYM_NOREPEAT {
	local($sym) = @_;
	eval q((($sym) & 0x8000));
    }
}
unless(defined(&KEYSYM_CLASS)) {
    sub KEYSYM_CLASS {
	local($sym) = @_;
	eval q((($sym) & 0xff00));
    }
}
unless(defined(&KEYSYM_DATA)) {
    sub KEYSYM_DATA {
	local($sym) = @_;
	eval q((($sym) & 0x00ff));
    }
}
unless(defined(&KEYSYM_ASCII)) {
    sub KEYSYM_ASCII () {	0;}
}
unless(defined(&KEYSYM_SPECIAL)) {
    sub KEYSYM_SPECIAL () {	0x8300;}
}
unless(defined(&KEYSYM_NOP)) {
    sub KEYSYM_NOP () {	0x8300;}
}
unless(defined(&KEYSYM_OOPS)) {
    sub KEYSYM_OOPS () {	0x8301;}
}
unless(defined(&KEYSYM_HOLE)) {
    sub KEYSYM_HOLE () {	0x8302;}
}
unless(defined(&KEYSYM_HW_ERR)) {
    sub KEYSYM_HW_ERR () {	0x8307;}
}
unless(defined(&KEYSYM_LAYOUT)) {
    sub KEYSYM_LAYOUT () {	0x830e;}
}
unless(defined(&KEYSYM_RESET)) {
    sub KEYSYM_RESET () {	0x830f;}
}
unless(defined(&KEYSYM_ACCENT)) {
    sub KEYSYM_ACCENT () {	0x0400;}
}
unless(defined(&KEYSYM_STRING)) {
    sub KEYSYM_STRING () {	0x0500;}
}
unless(defined(&KEYSYM_FUNC)) {
    sub KEYSYM_FUNC () {	0x0600;}
}
unless(defined(&KEYSYM_FUNC_L)) {
    sub KEYSYM_FUNC_L {
	local($x) = @_;
	eval q(( &KEYSYM_FUNC | (($x) - 1)));
    }
}
unless(defined(&KEYSYM_FUNC_R)) {
    sub KEYSYM_FUNC_R {
	local($x) = @_;
	eval q(( &KEYSYM_FUNC | (($x) - 1+ 0x10)));
    }
}
unless(defined(&KEYSYM_FUNC_F)) {
    sub KEYSYM_FUNC_F {
	local($x) = @_;
	eval q(( &KEYSYM_FUNC | (($x) - 1+ 0x20)));
    }
}
unless(defined(&KEYSYM_FUNC_N)) {
    sub KEYSYM_FUNC_N {
	local($x) = @_;
	eval q(( &KEYSYM_FUNC | (($x) - 1+ 0x30)));
    }
}
unless(defined(&KEYSYM_CLRMOD)) {
    sub KEYSYM_CLRMOD () {	0x9000;}
}
unless(defined(&KEYSYM_SETMOD)) {
    sub KEYSYM_SETMOD () {	0x9100;}
}
unless(defined(&KEYSYM_INVMOD)) {
    sub KEYSYM_INVMOD () {	0x9200;}
}
unless(defined(&KEYSYM_ALL_UP)) {
    sub KEYSYM_ALL_UP () {	0x9300;}
}
unless(defined(&KBMOD_CTRL_L)) {
    sub KBMOD_CTRL_L () {	0;}
}
unless(defined(&KBMOD_CTRL_R)) {
    sub KBMOD_CTRL_R () {	1;}
}
unless(defined(&KBMOD_SHIFT_L)) {
    sub KBMOD_SHIFT_L () {	2;}
}
unless(defined(&KBMOD_SHIFT_R)) {
    sub KBMOD_SHIFT_R () {	3;}
}
unless(defined(&KBMOD_META_L)) {
    sub KBMOD_META_L () {	4;}
}
unless(defined(&KBMOD_META_R)) {
    sub KBMOD_META_R () {	5;}
}
unless(defined(&KBMOD_ALT_L)) {
    sub KBMOD_ALT_L () {	6;}
}
unless(defined(&KBMOD_ALT_R)) {
    sub KBMOD_ALT_R () {	7;}
}
unless(defined(&KBMOD_CAPSLOCK)) {
    sub KBMOD_CAPSLOCK () {	16;}
}
unless(defined(&KBMOD_NUMLOCK)) {
    sub KBMOD_NUMLOCK () {	17;}
}
unless(defined(&KBMOD_ALTGRAPH)) {
    sub KBMOD_ALTGRAPH () {	 &KBMOD_ALT_R;}
}
if(defined(&_KERNEL)) {
    eval 'sub KEYMAP_SIZE () {128;}' unless defined(&KEYMAP_SIZE);
    eval 'sub KBD_MIN_TYPE () {2;}' unless defined(&KBD_MIN_TYPE);
}
1;
