--- /dev/null
+<h1><?php echo __("Keyboard Shortcuts") ?></h1>
+
+<table width='100%'><tr><td width='50%' valign='top'>
+
+ <h2><?php echo __("Navigation") ?></h2>
+
+ <table>
+ <tr><td class='n'>1</td><td><?php echo __("Preferences") ?></td></tr>
+ <tr><td class='n'>2</td><td><?php echo __("My Feeds") ?></td></tr>
+ <tr><td class='n'>3</td><td><?php echo __("Other Feeds") ?></td></tr>
+ <tr><td class='n'>4</td><td><?php echo __("Content Filtering") ?></td></tr>
+ <tr><td class='n'>5</td><td><?php echo __("Label Editor") ?></td></tr>
+ <tr><td class='n'>6</td><td><?php echo __("User Manager") ?></td></tr>
+ </table>
+
+</td><td valign='top'>
+
+ <h2><?php echo __("Panel actions") ?></h2>
+
+ <table>
+ <tr><td class='n'>c s</td><td><?php echo __("Subscribe to feed") ?></td></tr>
+ <tr><td class='n'>c f</td><td><?php echo __("Create filter") ?></td></tr>
+ <tr><td class='n'>c l</td><td><?php echo __("Create label") ?></td></tr>
+ <tr><td class='n'>c u</td><td><?php echo __("Create user") ?></td></tr>
+ </table>
+
+ <h2><?php echo __("Other actions") ?></h2>
+
+ <table>
+ <tr><td class='n'>g x</td><td><?php echo __("Exit preferences") ?></td></tr>
+ </table>
+
+</td></tr></table>
+
+<p class='insensitive'><span class='small'>Note: not all actions may be available, depending on Tiny Tiny RSS configuration and your access level.</span></p>
+
+<p class="small"><?php echo __("Press any key to close this window.") ?></p>
var init_params = new Array();
var caller_subop = false;
-
var sanity_check_done = false;
+var hotkey_prefix = false;
function infobox_callback() {
if (xmlhttp.readyState == 4) {
try {
var keycode;
-
- if (!hotkeys_enabled) return;
-
+ var shift_key = false;
+
+ try {
+ shift_key = e.shiftKey;
+ } catch (e) {
+
+ }
+
if (window.event) {
keycode = window.event.keyCode;
} else if (e) {
keycode = e.which;
}
-
+
+ if (keycode == 27) { // escape
+ if (Element.visible("hotkey_help_overlay")) {
+ Element.hide("hotkey_help_overlay");
+ }
+ hotkey_prefix = false;
+ closeInfoBox();
+ }
+
+ if (!hotkeys_enabled) {
+ debug("hotkeys disabled");
+ return;
+ }
+
+ if (keycode == 16) return; // ignore lone shift
+
+ if (Element.visible("hotkey_help_overlay")) {
+ Element.hide("hotkey_help_overlay");
+ }
+
if (keycode == 13 || keycode == 27) {
seq = "";
} else {
seq = seq + "" + keycode;
}
+ /* Global hotkeys */
- if (document.getElementById("piggie")) {
+ if (!hotkey_prefix) {
+
+ if (keycode == 68 && shift_key) { // d
+ if (!debug_mode_enabled) {
+ document.getElementById('debug_output').style.display = 'block';
+ debug('debug mode activated');
+ } else {
+ document.getElementById('debug_output').style.display = 'none';
+ }
- if (seq.match("807371717369")) {
- seq = "";
- localPiggieFunction(true);
+ debug_mode_enabled = !debug_mode_enabled;
+ return;
+ }
+
+ if (keycode == 191 && shift_key) { // ?
+ if (!Element.visible("hotkey_help_overlay")) {
+ Element.show("hotkey_help_overlay");
+ } else {
+ Element.hide("hotkey_help_overlay");
+ }
+ return;
+ }
+
+ if (keycode == 49) { // 1
+ selectTab("genConfig");
+ }
+
+ if (keycode == 50 && document.getElementById("feedConfigTab")) { // 2
+ return selectTab("feedConfig");
+ }
+
+ if (keycode == 51 && document.getElementById("feedBrowserTab")) { // 3
+ return selectTab("feedBrowser");
+ }
+
+ if (keycode == 52 && document.getElementById("filterConfigTab")) { // 4
+ return selectTab("filterConfig");
+ }
+
+ if (keycode == 53 && document.getElementById("labelConfigTab")) { // 5
+ return selectTab("labelConfig");
+ }
+
+ if (keycode == 54 && document.getElementById("userConfigTab")) { // 6
+ return selectTab("userConfig");
+ }
+
+ }
+
+ if (document.getElementById("piggie")) {
+
+ if (seq.match("807371717369")) {
+ seq = "";
+ localPiggieFunction(true);
+ } else {
+ localPiggieFunction(false);
+ }
+ }
+
+ if (hotkey_prefix) {
+ debug("KP: PREFIX=" + hotkey_prefix + " CODE=" + keycode);
} else {
- localPiggieFunction(false);
+ debug("KP: CODE=" + keycode);
}
- }
} catch (e) {
exception_error("pref_hotkey_handler", e);
<body>
-<img id="piggie" src="images/piggie.png" style="display : none" alt="piggie">
-
<div id="hotkey_help_overlay" style="display : none" onclick="Element.hide(this)">
+ <?php rounded_table_start("hho"); ?>
<?php include "help/4.php" ?>
+ <?php rounded_table_end(); ?>
</div>
+<img id="piggie" src="images/piggie.png" style="display : none" alt="piggie">
+
<script type="text/javascript">
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", init, null);