######################################################################
# Japanese Keyboard file.
# This is the mapping table for translation of X-symbols
# into DOS key codes and shift states for the Japanese keyboard.
#
# This table is based on the IBM enhanced Japanese keyboard and 
# Sun keyboards.  (NOTE: We currently use the US keyboard definitions,
# and the keyboard in Windows must be set to the US 101 key keyboard,
# as the PIC doesn't support all the necessary output values for the
# definition of a proper Japanese keyboard, e.g. the value for Yen is
# missing, but works on the US keyboard as it's mapped to backslash)
#   
# When the Japanese keyboard is called for, this table is loaded 
# first. The appropriate Code Page table is then loaded to 
# provide mappings for Xsymbols that do not have representation
# on the keyboard and do appear in the DOS Code Page. This double
# table approach covers use of the Sun keyboard's COMPOSE key
# to generate characters not found on the keyboard.
#  
# The Xsymbols defined in this table  are mapped into the 
# physical location of the appropriate legend on an IBM 102 
# key Enhanced Keyboard. In some cases, the physical location
# followed by a shift state descriptor. This shift state 
# descriptor can be "shift", "Alt Graph", "Caps Lock" and
# "Shift Lock".
# The shift state descriptor is used for a number of things.
#
#  SHIFT: Shift is used when it is necessary to correctly
#         define the DOS legend position for the  Xsymbol 
#         that is being mapped. For example:
#           On the US keyboard the asterisk legend is in 
#           the "shifted position of the key located at 
#           key station 9.
#
#         Shift is also used to assist the keyboard emulation
#         software to distingish between capital and lowercase
#         letters.
#   
#  Alt Graphic: Alt Graphic is shortened to "Alt" in the tables.
#         It is used to inform the emulation software that
#         the key symbol fals in the Alt Graphic location of the
#         key cap.
#
#  Caps Lock: Caps Lock is used to inform the emulator that 
#         the interpretation of the key stroke being mapped
#          can be influenced by the Caps Lock key.
#
#  Shift Lock: Shift Lock is used to inform the emulator that
#         the interpretation of the key stroke being mapped 
#         can be influenced by the shift lock key.
#
# The actual semantics of "shift", "Caps Lock" etc are handled 
# elsewhere.  For example:
#    The meaning of pressing the shift key  and the "A" key
#    while the Caps Lock state is on, is left up to other software.
#
#  
#
# Definitions of shorthand found in the comments::
#
#              shift               shifted key location
#              alt                 Alt Graph key location
#              caps_lock           Caps Lock affected key
#              shift_lock          Shift Lock affected  key
#              CP or cp            Cursor Pad
#              FK of fk            Function Key
#
#              MT or Main Array    Main Typing Array
#              NP or np            Numeric Pad
#
#			##				This definition may lead to problems.
#							It is still being reviewed.
# End of Definitions

######################################################
#
# Miscellaneous keyboard functions shared by all keyboards

XK_BackSpace		15	any	# DOS MT Backspace
XK_Tab			16	any
XK_Return		43	any	# DOS MT enter
XK_Pause		126	any	# DOS NP or FK Pause
XK_Scroll_Lock		125	any     # DOS NP or FK Scroll Lock
XK_Escape		110	any
XK_Delete		76	any	# DOS NP Delete 

######################################################################
#
# Cursor control & motion functions shared by all keyboards

XK_Home			80	any	# NP home see XK_Begin
XK_Left			79	any	# NP left arrow
XK_Up			83	any	# NP up arrow
XK_Right		89	any	# NP right arrow
XK_Down			84	any	# NP down arrow
XK_Prior		85	any	# NP page up
XK_Next			86	any	# NP page down
XK_End			81	any	# NP end
XK_Begin		80	any	## NP home see XK_Home

######################################################################
#
# Specific Function keys shared by all keyboards

XK_Print		124	any	## NP or FK Print Screen
XK_Insert		75	any	# Insert, insert here
XK_Break		126	any	## NP or FK Break (ctrl shift?)
XK_Num_Lock		90	any	# NP or FK Num Lock

#####################################################################
#
# Numeric Keypad numbers and calculator functions
# shared by all keyboards.

XK_KP_Space		61	any	# MT space bar		
XK_KP_Tab		16	any	## mapped to MT Tab
XK_KP_Enter		108	any	# NP enter
XK_KP_Equal		13		## mapped to MT Equal
XK_KP_Multiply		100	any	# NP asterisk or multiply
XK_KP_Add		106	any	# NP plus
XK_KP_Subtract		105	any	# NP minus
XK_KP_Decimal		104	any	## NP Del key
XK_KP_Divide		95	any	# NP slash

XK_KP_0			99	any	# NP 0
XK_KP_1			93	any	# NP 1
XK_KP_2			98	any	# NP 2
XK_KP_3			103	any	# NP 3
XK_KP_4			92	any	# NP 4
XK_KP_5			97	any	# NP 5
XK_KP_6			102	any	# NP 6
XK_KP_7			91	any	# NP 7
XK_KP_8			96	any	# NP 8
XK_KP_9			101	any	# NP 9

#####################################################################
#
# Generic Function Keys including Sun's numeric pad 
# function keys shared by all keyboards
			
XK_F1			112	any
XK_F2			113	any
XK_F3			114	any
XK_F4			115	any
XK_F5			116	any
XK_F6			117	any
XK_F7			118	any
XK_F8			119	any
XK_F9			120	any
XK_F10			121	any
XK_F11				
XK_L1			
XK_F12			
XK_L2			

XK_F21			126	any	## DOS NP or FK pause
XK_R1			126	any	#  DOS NP or FK pause

XK_F22			124	any	## DOS NP or FK Print Screen
XK_R2			124	any	#  DOS NP or FK Print Screen

XK_F23			125	any	## DOS NP or FK Scroll Lock
XK_R3			125	any	#  DOS NP or FK Scroll Lock

XK_F24			13		## DOS NP =
XK_R4			13		#  DOS NP =


XK_F25			95	any	## DOS NP / slash
XK_R5			95	any	#  DOS NP / slash

XK_F26			100	any	## DOS NP * multiply
XK_R6			100	any	#  DOS NP * mulitply

XK_F27			91	any	## DOS NP 7/Home
XK_R7			91	any	#  DOS NP 7/Home

XK_F28			96	any	## DOS NP 8/up arrow
XK_R8			96	any	#  DOS NP 8/up arrow

XK_F29			101	any	## DOS NP 9/Pg Up
XK_R9			101	any	#  DOS NP 9/Pg Up

XK_F30			92	any	## DOS NP 4/left arrow
XK_R10			92	any	#  DOS NP 4/left arrow

XK_F31			97	any	## DOS NP 5
XK_R11			97	any	#  DOS NP 5

XK_F32			102	any	## DOS NP 6/right arrow
XK_R12			102	any	#  DOS NP 6/right arrow

XK_R13			93	any	## DOS NP 1/End
XK_F33			93	any	#  DOS NP 1/End

XK_F34			98	any	## DOS NP 2/down arrow
XK_R14			98	any	#  DOS NP 2/down arrow

XK_F35			103	any	## DOS NP 3/Pg Dn
XK_R15			103	any	#  DOS NP 3/Pg Dn

#####################################################################
#
# Modifiers

XK_Shift_L		44 	any	# Leftshift
XK_Shift_R		57 	any	# ightshift
XK_Control_L		58 	any	# Leftcontrol
XK_Control_R		64 	any	# Rightcontrol
XK_Caps_Lock		30 	any	# Capslock
XK_Shift_Lock				# Shiftlock

XK_Meta_R			#64		# Rightmeta / ctrl_R
XK_Alt_L		60	any 	# Leftalt
XK_Alt_R		62 	any	# Rightalt / Alt Graph
XK_Mode_switch		62 	any	# Rightalt / Alt Graph
XK_Help			112	any	
#####################################################################
#
# Latin1 

XK_space		61	any
XK_exclam		2	shift
XK_quotedbl		41	shift
XK_numbersign		4	shift
XK_dollar		5	shift
XK_percent		6	shift
XK_ampersand		8	shift
XK_apostrophe		41			## MT apostrophe see XK_quoteright
XK_quoteright		41			## MT apostrophe see XK_apostrophe
XK_parenleft		10	shift
XK_parenright		11	shift
XK_asterisk		9	shift
XK_plus			13	shift	# MT plus
XK_comma		53			# MT comma
XK_minus		12			# MT minus
XK_period		54			# MT period
XK_slash		55			# MT slash
XK_0			11
XK_1			2
XK_2			3
XK_3			4
XK_4			5
XK_5			6
XK_6			7
XK_7			8
XK_8			9
XK_9			10
XK_colon		40	shift
XK_semicolon		40
XK_less			53	shift	# MT left angle bracket
XK_equal		13
XK_greater		54	shift	# MT right angle bracket
XK_question		55	shift
XK_at			3	shift     # MT @-sign
XK_A			31	shift caps
XK_B			50	shift caps
XK_C			48	shift caps
XK_D			33	shift caps
XK_E			19	shift caps
XK_F			34	shift caps
XK_G			35	shift caps
XK_H			36	shift caps
XK_I			24	shift caps
XK_J			37	shift caps
XK_K			38	shift caps
XK_L			39	shift caps
XK_M			52	shift caps
XK_N			51	shift caps
XK_O			25	shift caps
XK_P			26	shift caps
XK_Q			17	shift caps
XK_R			20	shift caps
XK_S			32	shift caps
XK_T			21	shift caps
XK_U			23	shift caps
XK_V			49	shift caps
XK_W			18	shift caps
XK_X			47	shift caps
XK_Y			22	shift caps
XK_Z			46	shift caps
XK_bracketleft		27			## MT square bracket
XK_backslash		29			#  MT backslash
XK_bracketright		28			## MT square bracket
XK_asciicircum		7	shift
XK_underscore		12	shift
XK_grave		1			# MT spacing grave; see XK_ leftquote
XK_quoteleft		1			# MT left quote;  see XK_grave
XK_a			31	caps
XK_b			50	caps
XK_c			48	caps
XK_d			33	caps
XK_e			19	caps
XK_f			34	caps
XK_g			35	caps
XK_h			36	caps
XK_i			24	caps
XK_j			37	caps
XK_k			38	caps
XK_l			39	caps
XK_m			52	caps
XK_n			51	caps
XK_o			25	caps
XK_p			26	caps
XK_q			17	caps
XK_r			20	caps
XK_s			32	caps
XK_t			21	caps
XK_u			23	caps
XK_v			49	caps
XK_w			18	caps
XK_x			47	caps
XK_y			22	caps
XK_z			46	caps
XK_braceleft		27	shift	## MT curly bracket
XK_bar			29	shift	## MT vertical bar
XK_braceright		28	shift	## MT curly bracket
XK_asciitilde		1	shift	# MT spacing tilda


XK_SunF36		122	any # keyboard F11 key
XK_SunXK_F36		122    	any	# keyboard F11 key

XK_SunF37		123	any # keyboard F12 key
XK_SunXK_F37		123     any	# keyboard F12 key

# End of Japanese keyboard.
#
############################################################
