| 
									
										
										
										
											2012-08-10 18:31:32 +04:00
										 |  |  | /*********************************************************************/ | 
					
						
							| 
									
										
										
										
											2012-08-10 20:44:48 +04:00
										 |  |  | // NOTE: use String.fromCharCode(code)...
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | var keybindings = { | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 	// togglable modes and options...
 | 
					
						
							| 
									
										
										
										
											2012-08-20 02:12:33 +04:00
										 |  |  | 	191: { | 
					
						
							|  |  |  | 		'default':	ImageGrid.showKeyboardBindings,			//	?
 | 
					
						
							|  |  |  | 		'ctrl':		ImageGrid.showSetup,					//	ctrl+?
 | 
					
						
							|  |  |  | 	}, | 
					
						
							| 
									
										
										
										
											2012-08-14 23:40:26 +04:00
										 |  |  | 	70:		ImageGrid.toggleSingleImageMode,				//	f
 | 
					
						
							|  |  |  | 	83:		ImageGrid.toggleSingleRibbonMode,				//	s
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	13:		70,												//	Enter
 | 
					
						
							| 
									
										
										
										
											2012-08-15 04:03:11 +04:00
										 |  |  | 	84:		ImageGrid.toggleSingleImageModeTransitions,		//	t
 | 
					
						
							|  |  |  | 	65:		ImageGrid.toggleTransitions,					//	a
 | 
					
						
							|  |  |  | 	9:		ImageGrid.toggleControls,						//	tab
 | 
					
						
							| 
									
										
										
										
											2012-08-19 20:32:37 +04:00
										 |  |  | 	66:		ImageGrid.toggleBackgroundModes,				//	b
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	77:		toggleMarkers,									//	m
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-19 20:32:37 +04:00
										 |  |  | 	27:		ImageGrid.closeOverlay,							//	Esc	
 | 
					
						
							| 
									
										
										
										
											2012-08-17 06:56:54 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	// zooming...
 | 
					
						
							| 
									
										
										
										
											2012-08-19 20:12:40 +04:00
										 |  |  | 	187:	ImageGrid.scaleContainerUp,						//	+
 | 
					
						
							|  |  |  | 	189:	ImageGrid.scaleContainerDown,					//	-
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	// zoom presets...
 | 
					
						
							|  |  |  | 	48:	{ | 
					
						
							| 
									
										
										
										
											2012-08-19 20:12:40 +04:00
										 |  |  | 		'default':	ImageGrid.fitImage,						// 	0
 | 
					
						
							| 
									
										
										
										
											2012-08-19 19:30:59 +04:00
										 |  |  | 		// XXX make this into a real action...
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 		'ctrl':		function(){setContainerScale(1)},		//	ctrl+0
 | 
					
						
							|  |  |  | 	}, | 
					
						
							| 
									
										
										
										
											2012-08-19 20:12:40 +04:00
										 |  |  | 	49:		ImageGrid.fitImage,								//	1
 | 
					
						
							|  |  |  | 	50:		ImageGrid.fitTwoImages,							//	2
 | 
					
						
							|  |  |  | 	51:		ImageGrid.fitThreeImages,						//	3
 | 
					
						
							|  |  |  | 	52:		ImageGrid.fitFourImages,						//	4
 | 
					
						
							|  |  |  | 	53:		ImageGrid.fitFiveImages,						//	5
 | 
					
						
							|  |  |  | 	54:		ImageGrid.fitSixImages,							//	6
 | 
					
						
							|  |  |  | 	55:		ImageGrid.fitSevenImages,						//	7
 | 
					
						
							|  |  |  | 	56:		ImageGrid.fitEightImages,						//	8
 | 
					
						
							|  |  |  | 	57:		ImageGrid.fitNineImages,						//	9
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// navigation...
 | 
					
						
							| 
									
										
										
										
											2012-08-19 19:30:59 +04:00
										 |  |  | 	36:		ImageGrid.firstImage,							//	Home
 | 
					
						
							|  |  |  | 	35:		ImageGrid.lastImage,							//	End
 | 
					
						
							| 
									
										
										
										
											2012-08-10 19:40:26 +04:00
										 |  |  | 	37:	{ | 
					
						
							| 
									
										
										
										
											2012-08-19 19:30:59 +04:00
										 |  |  | 		'default': ImageGrid.prevImage,						//	Right
 | 
					
						
							|  |  |  | 		'ctrl': ImageGrid.prevScreenImages,					//	ctrl-Right
 | 
					
						
							|  |  |  | 		'alt': ImageGrid.prevScreenImages,					//	alt-Right
 | 
					
						
							| 
									
										
										
										
											2012-08-10 19:40:26 +04:00
										 |  |  | 	}, | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	80: 	37, 											// 	BkSp
 | 
					
						
							|  |  |  | 	188:	37, 											//	p
 | 
					
						
							|  |  |  | 	8:		37,												//	<
 | 
					
						
							| 
									
										
										
										
											2012-08-10 19:40:26 +04:00
										 |  |  | 	39:	{ | 
					
						
							| 
									
										
										
										
											2012-08-19 19:30:59 +04:00
										 |  |  | 		'default': ImageGrid.nextImage,						//	Left
 | 
					
						
							|  |  |  | 		'ctrl': ImageGrid.nextScreenImages,					//	ctrl-Left
 | 
					
						
							|  |  |  | 		'alt': ImageGrid.nextScreenImages,					//	alt-Left
 | 
					
						
							| 
									
										
										
										
											2012-08-10 19:40:26 +04:00
										 |  |  | 	}, | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	32:		39,												//	Space
 | 
					
						
							|  |  |  | 	190:	39,												//	m
 | 
					
						
							|  |  |  | 	78: 	39,												//	>
 | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 	// move view...
 | 
					
						
							|  |  |  | 	// XXX should these be s-up, s-down, ... ??
 | 
					
						
							| 
									
										
										
										
											2012-08-19 19:30:59 +04:00
										 |  |  | 	75:		ImageGrid.moveViewUp,							//	k
 | 
					
						
							|  |  |  | 	74:		ImageGrid.moveViewDown,							//	j
 | 
					
						
							|  |  |  | 	72:		ImageGrid.moveViewLeft,							//	h
 | 
					
						
							|  |  |  | 	76:		ImageGrid.moveViewRight,						//	l
 | 
					
						
							|  |  |  | 	79:		ImageGrid.centerCurrentImage,					//	o
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// combined navigation with actions..
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	40:	{ | 
					
						
							| 
									
										
										
										
											2012-08-19 19:30:59 +04:00
										 |  |  | 		'default': ImageGrid.focusBelowRibbon,				//	Down
 | 
					
						
							| 
									
										
										
										
											2012-08-19 21:23:29 +04:00
										 |  |  | 		'shift': ImageGrid.shiftImageDown,					//	shift-Down
 | 
					
						
							| 
									
										
										
										
											2012-08-19 21:34:31 +04:00
										 |  |  | 		'ctrl+shift': ImageGrid.shiftImageDownNewRibbon		//	ctrl-shift-Down
 | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 	}, | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	38: { | 
					
						
							| 
									
										
										
										
											2012-08-19 19:30:59 +04:00
										 |  |  | 		'default': ImageGrid.focusAboveRibbon,				//	Up
 | 
					
						
							| 
									
										
										
										
											2012-08-19 21:23:29 +04:00
										 |  |  | 		'shift': ImageGrid.shiftImageUp,					//	shift-Up
 | 
					
						
							| 
									
										
										
										
											2012-08-19 21:34:31 +04:00
										 |  |  | 		'ctrl+shift': ImageGrid.shiftImageUpNewRibbon		//	ctrl-shift-Up
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	}, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 	// ignore the modifiers (shift, alt, ctrl, caps)...
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	16:		function(){}, | 
					
						
							|  |  |  | 	17:		16, | 
					
						
							|  |  |  | 	18:		16, | 
					
						
							| 
									
										
										
										
											2012-08-10 20:44:48 +04:00
										 |  |  | 	20:		16,												// Caps Lock
 | 
					
						
							| 
									
										
										
										
											2012-08-17 07:30:03 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// refresh...
 | 
					
						
							| 
									
										
										
										
											2012-08-19 19:30:59 +04:00
										 |  |  | 	// XXX make this into a real action...
 | 
					
						
							| 
									
										
										
										
											2012-08-17 07:30:03 +04:00
										 |  |  | 	116:	function(){ return DEBUG?true:false }			// F5
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2012-08-10 18:31:32 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-10 18:31:32 +04:00
										 |  |  | /*********************************************************************/ | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | // vim:set ts=4 sw=4 nowrap :
 |