4
0
Эх сурвалжийг харах

Add shortcuts to switch views (#1755)

Alexis Degrugillier 8 жил өмнө
parent
commit
e73fae1591

+ 1 - 1
app/Controllers/configureController.php

@@ -170,7 +170,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
 		                   'm', 'n', 'o', 'p', 'page_down', 'page_up', 'q', 'r', 'return', 'right',
 		                   's', 'space', 't', 'tab', 'u', 'up', 'v', 'w', 'x', 'y',
 		                   'z', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9',
-		                   'f10', 'f11', 'f12');
+		                   'f10', 'f11', 'f12', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0');
 		$this->view->list_keys = $list_keys;
 
 		if (Minz_Request::isPost()) {

+ 5 - 0
app/i18n/cz/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => 'Srolovat',
 		'first_article' => 'Skočit na první článek',
 		'focus_search' => 'Hledání',
+		'global_view' => 'Switch to global view', // TODO
 		'help' => 'Zobrazit documentaci',
 		'javascript' => 'Pro použití zkratek musí být povolen JavaScript',
 		'last_article' => 'Skočit na poslední článek',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => 'Navigace',
 		'navigation_help' => 'Pomocí přepínače "Shift" fungují navigační zkratky v rámci kanálů.<br/>Pomocí přepínače "Alt" fungují v rámci kategorií.',
 		'next_article' => 'Skočit na další článek',
+		'normal_view' => 'Switch to normal view', // TODO
 		'other_action' => 'Ostatní akce',
 		'previous_article' => 'Skočit na předchozí článek',
+		'reading_view' => 'Switch to reading view', // TODO
+		'rss_view' => 'Open RSS view in a new tab', // TODO
 		'see_on_website' => 'Navštívit původní webovou stránku',
 		'shift_for_all_read' => '+ <code>shift</code> označí vše jako přečtené',
 		'title' => 'Zkratky',
 		'user_filter' => 'Aplikovat uživatelské filtry',
 		'user_filter_help' => 'Je-li nastaven pouze jeden filtr, bude použit. Další filtry jsou dostupné pomocí jejich čísla.',
+		'views' => 'Views', // TODO
 	),
 	'user' => array(
 		'articles_and_size' => '%s článků (%s)',

+ 5 - 0
app/i18n/de/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => 'Einklappen',
 		'first_article' => 'Zum ersten Artikel springen',
 		'focus_search' => 'Auf das Suchfeld zugreifen',
+		'global_view' => 'Switch to global view', // TODO
 		'help' => 'Dokumentation anzeigen',
 		'javascript' => 'JavaScript muss aktiviert sein, um Tastaturkürzel benutzen zu können',
 		'last_article' => 'Zum letzten Artikel springen',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => 'Navigation',
 		'navigation_help' => 'Mit der "Umschalttaste" finden die Tastenkombination auf Feeds Anwendung.<br/>Mit der "Alt-Taste" finden die Tastenkombination auf Kategorien Anwendung.',
 		'next_article' => 'Zum nächsten Artikel springen',
+		'normal_view' => 'Switch to normal view', // TODO
 		'other_action' => 'Andere Aktionen',
 		'previous_article' => 'Zum vorherigen Artikel springen',
+		'reading_view' => 'Switch to reading view', // TODO
+		'rss_view' => 'Open RSS view in a new tab', // TODO
 		'see_on_website' => 'Auf der Original-Webseite ansehen',
 		'shift_for_all_read' => '+ <code>Umschalttaste</code>, um alle Artikel als gelesen zu markieren.',
 		'title' => 'Tastenkombination',
 		'user_filter' => 'Auf Benutzerfilter zugreifen',
 		'user_filter_help' => 'Wenn es nur einen Benutzerfilter gibt, wird dieser verwendet. Ansonsten sind die Filter über ihre Nummer erreichbar.',
+		'views' => 'Views', // TODO
 	),
 	'user' => array(
 		'articles_and_size' => '%s Artikel (%s)',

+ 5 - 0
app/i18n/en/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => 'Collapse',
 		'first_article' => 'Skip to the first article',
 		'focus_search' => 'Access search box',
+		'global_view' => 'Switch to global view',
 		'help' => 'Display documentation',
 		'javascript' => 'JavaScript must be enabled in order to use shortcuts',
 		'last_article' => 'Skip to the last article',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => 'Navigation',
 		'navigation_help' => 'With the "Shift" modifier, navigation shortcuts apply on feeds.<br/>With the "Alt" modifier, navigation shortcuts apply on categories.',
 		'next_article' => 'Skip to the next article',
+		'normal_view' => 'Switch to normal view',
 		'other_action' => 'Other actions',
 		'previous_article' => 'Skip to the previous article',
+		'reading_view' => 'Switch to reading view',
+		'rss_view' => 'Open RSS view in a new tab',
 		'see_on_website' => 'See on original website',
 		'shift_for_all_read' => '+ <code>shift</code> to mark all articles as read',
 		'title' => 'Shortcuts',
 		'user_filter' => 'Access user filters',
 		'user_filter_help' => 'If there is only one user filter, it is used. Otherwise, filters are accessible by their number.',
+		'views' => 'Views',
 	),
 	'user' => array(
 		'articles_and_size' => '%s articles (%s)',

+ 5 - 0
app/i18n/es/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => 'Contraer',
 		'first_article' => 'Saltar al primer artículo',
 		'focus_search' => 'Acceso a la casilla de búsqueda',
+		'global_view' => 'Switch to global view', // TODO
 		'help' => 'Mostrar documentación',
 		'javascript' => 'JavaScript debe estar activado para poder usar atajos de teclado',
 		'last_article' => 'Saltar al último artículo',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => 'Navegación',
 		'navigation_help' => 'Con el modificador "Mayúsculas" es posible usar los atajos de teclado en las fuentes.<br/>Con el modificador "Alt" es posible aplicar los atajos de teclado en las categorías.',
 		'next_article' => 'Saltar al siguiente artículo',
+		'normal_view' => 'Switch to normal view', // TODO
 		'other_action' => 'Otras acciones',
 		'previous_article' => 'Saltar al artículo anterior',
+		'reading_view' => 'Switch to reading view', // TODO
+		'rss_view' => 'Open RSS view in a new tab', // TODO
 		'see_on_website' => 'Ver en la web original',
 		'shift_for_all_read' => '+ <code>mayúsculas</code> para marcar todos los artículos como leídos',
 		'title' => 'Atajos de teclado',
 		'user_filter' => 'Acceso a filtros de usuario',
 		'user_filter_help' => 'Si solo hay un filtro de usuario, ese será el que se use. En caso contrario, los filtros están accesibles por su númeración.',
+		'views' => 'Views', // TODO
 	),
 	'user' => array(
 		'articles_and_size' => '%s artículos (%s)',

+ 5 - 0
app/i18n/fr/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => 'Refermer',
 		'first_article' => 'Passer au premier article',
 		'focus_search' => 'Accéder à la recherche',
+		'global_view' => 'Basculer vers la vue globale',
 		'help' => 'Afficher la documentation',
 		'javascript' => 'Le JavaScript doit être activé pour pouvoir profiter des raccourcis.',
 		'last_article' => 'Passer au dernier article',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => 'Navigation',
 		'navigation_help' => 'Avec le modificateur "Shift", les raccourcis de navigation s’appliquent aux flux.<br/>Avec le modificateur "Alt", les raccourcis de navigation s’appliquent aux catégories.',
 		'next_article' => 'Passer à l’article suivant',
+		'normal_view' => 'Basculer vers la vue normale',
 		'other_action' => 'Autres actions',
 		'previous_article' => 'Passer à l’article précédent',
+		'reading_view' => 'Basculer vers la vue lecture',
+		'rss_view' => 'Ouvrir le flux RSS dans un nouvel onglet',
 		'see_on_website' => 'Voir sur le site d’origine',
 		'shift_for_all_read' => '+ <code>shift</code> pour marquer tous les articles comme lus',
 		'title' => 'Raccourcis',
 		'user_filter' => 'Accéder aux filtres utilisateur',
 		'user_filter_help' => 'S’il n’y a qu’un filtre utilisateur, celui-ci est utilisé automatiquement. Sinon ils sont accessibles par leur numéro.',
+		'views' => 'Vues',
 	),
 	'user' => array(
 		'articles_and_size' => '%s articles (%s)',

+ 5 - 0
app/i18n/he/conf.php

@@ -145,6 +145,7 @@ return array(
 		'collapse_article' => 'כיווץ',
 		'first_article' => 'דילוג למאמר הראשון',
 		'focus_search' => 'גישה לתיבת החיפוש',
+		'global_view' => 'Switch to global view', // TODO
 		'help' => 'הצגת התיעוד',
 		'javascript' => 'חובה להפעיל JavaScript על מנת לעשות שימוש בקיצורי דרך',
 		'last_article' => 'דילוג למאמר האחרון',
@@ -154,13 +155,17 @@ return array(
 		'navigation' => 'ניווט',
 		'navigation_help' => 'בעזרת מקש השיפט קיצורי דרך חלים על הזנות .<br/>עם מקש האלט הם חלים על קטגוריות.',
 		'next_article' => 'דילוג למאמר הבא',
+		'normal_view' => 'Switch to normal view', // TODO
 		'other_action' => 'פעולות אחרות',
 		'previous_article' => 'דילוג למאמר הקודם',
+		'reading_view' => 'Switch to reading view', // TODO
+		'rss_view' => 'Open RSS view in a new tab', // TODO
 		'see_on_website' => 'ראו את המקור באתר',
 		'shift_for_all_read' => '+ <code>shift</code> על מנת לסמן את כל המאמרים כנקראו',
 		'title' => 'קיצורי דרך',
 		'user_filter' => 'גישה למססנים',
 		'user_filter_help' => 'אם יש רק מזנן אחד הוא יהיה בשימוש. אחרת המסננים ישמשו על בסיס המספר שלהם.',
+		'views' => 'Views', // TODO
 	),
 	'user' => array(
 		'articles_and_size' => '%s articles (%s)', // @todo

+ 5 - 0
app/i18n/it/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => 'Collassa articoli',
 		'first_article' => 'Salta al primo articolo',
 		'focus_search' => 'Modulo di ricerca',
+		'global_view' => 'Switch to global view', // TODO
 		'help' => 'Mostra documentazione',
 		'javascript' => 'JavaScript deve essere abilitato per poter usare i comandi da tastiera',
 		'last_article' => 'Salta all ultimo articolo',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => 'Navigazione',
 		'navigation_help' => 'Con il tasto "Shift" i comandi di navigazione verranno applicati ai feeds.<br/>Con il tasto "Alt" i comandi di navigazione verranno applicati alle categorie.',
 		'next_article' => 'Salta al contenuto successivo',
+		'normal_view' => 'Switch to normal view', // TODO
 		'other_action' => 'Altre azioni',
 		'previous_article' => 'Salta al contenuto precedente',
+		'reading_view' => 'Switch to reading view', // TODO
+		'rss_view' => 'Open RSS view in a new tab', // TODO
 		'see_on_website' => 'Vai al sito fonte',
 		'shift_for_all_read' => '+ <code>shift</code> per segnare tutti gli articoli come letti',
 		'title' => 'Comandi da tastiera',
 		'user_filter' => 'Accedi alle ricerche personali',
 		'user_filter_help' => 'Se è presente una sola ricerca personale verrà usata quella, altrimenti usare anche il numero associato.',
+		'views' => 'Views', // TODO
 	),
 	'user' => array(
 		'articles_and_size' => '%s articoli (%s)',

+ 5 - 0
app/i18n/kr/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => '접기',
 		'first_article' => '첫 글 보기',
 		'focus_search' => '검색창 사용하기',
+		'global_view' => 'Switch to global view', // TODO
 		'help' => '도움말 보기',
 		'javascript' => '단축키를 사용하기 위해선 자바스크립트를 사용하도록 설정하여야 합니다',
 		'last_article' => '마지막 글 보기',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => '탐색',
 		'navigation_help' => '"Shift" 키를 누른 상태에선 탐색 단축키가 피드에 적용됩니다.<br/>"Alt" 키를 누른 상태에선 탐색 단축키가 카테고리에 적용됩니다.',
 		'next_article' => '다음 글 보기',
+		'normal_view' => 'Switch to normal view', // TODO
 		'other_action' => '다른 동작',
 		'previous_article' => '이전 글 보기',
+		'reading_view' => 'Switch to reading view', // TODO
+		'rss_view' => 'Open RSS view in a new tab', // TODO
 		'see_on_website' => '글이 게재된 웹사이트에서 보기',
 		'shift_for_all_read' => '+ <code>shift</code>를 누른 상태에선 모두 읽음으로 표시',
 		'title' => '단축키',
 		'user_filter' => '사용자 필터 사용하기',
 		'user_filter_help' => '사용자 필터가 하나만 설정되어 있다면 해당 필터를 사용하고, 그렇지 않다면 필터를 번호로 선택할 수 있습니다.',
+		'views' => 'Views', // TODO
 	),
 	'user' => array(
 		'articles_and_size' => '%s 개의 글 (%s)',

+ 5 - 0
app/i18n/nl/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => 'Inklappen',
 		'first_article' => 'Spring naar eerste artikel',
 		'focus_search' => 'Toegang zoek venster',
+		'global_view' => 'Switch to global view', // TODO
 		'help' => 'Toon documentatie',
 		'javascript' => 'JavaScript moet geactiveerd zijn om verwijzingen te gebruiken',
 		'last_article' => 'Spring naar laatste artikel',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => 'Navigatie',
 		'navigation_help' => 'Met de "Shift" toets, kunt u navigatie verwijzingen voor feeds gebruiken.<br/>Met de "Alt" toets, kunt u navigatie verwijzingen voor categoriën gebruiken.',
 		'next_article' => 'Spring naar volgende artikel',
+		'normal_view' => 'Switch to normal view', // TODO
 		'other_action' => 'Andere acties',
 		'previous_article' => 'Spring naar vorige artikel',
+		'reading_view' => 'Switch to reading view', // TODO
+		'rss_view' => 'Open RSS view in a new tab', // TODO
 		'see_on_website' => 'Bekijk op originale website',
 		'shift_for_all_read' => '+ <code>shift</code> om alle artikelen als gelezen te markeren',
 		'title' => 'Verwijzingen',
 		'user_filter' => 'Toegang gebruikers filters',
 		'user_filter_help' => 'Als er slechts één gebruikers filter s, dan wordt deze gebruikt. Anders zijn ze toegankelijk met hun nummer.',
+		'views' => 'Views', // TODO
 	),
 	'user' => array(
 		'articles_and_size' => '%s artikelen (%s)',

+ 5 - 0
app/i18n/pt-br/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => 'Fechar',
 		'first_article' => 'Ir para o primeiro artigo',
 		'focus_search' => 'Acessar a caixa de busca',
+		'global_view' => 'Switch to global view', // TODO
 		'help' => 'Mostrar documentação',
 		'javascript' => 'JavaScript deve ser habilitado para utilizar atalhos',
 		'last_article' => 'Ir para o último artigo',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => 'Navegação',
 		'navigation_help' => 'Com o modificador "Shift", atalhos de navegação aplicam aos feeds.<br/>Com o "Alt" modificador, atalhos de navegação aplicam as categorias.',
 		'next_article' => 'Pule para o próximo artigo',
+		'normal_view' => 'Switch to normal view', // TODO
 		'other_action' => 'Outras ações',
 		'previous_article' => 'Pule para o artigo anterior',
+		'reading_view' => 'Switch to reading view', // TODO
+		'rss_view' => 'Open RSS view in a new tab', // TODO
 		'see_on_website' => 'Visualize o site original',
 		'shift_for_all_read' => '+ <code>shift</code> para marcar todos os artigos como lido',
 		'title' => 'Atalhos',
 		'user_filter' => 'Acesse filtros de usuário',
 		'user_filter_help' => 'Se há apenas um filtro, ele é utilizado. Caso contrário, os filtros serão acessíveis pelos seus números.',
+		'views' => 'Views', // TODO
 	),
 	'user' => array(
 		'articles_and_size' => '%s artigos (%s)',

+ 5 - 0
app/i18n/ru/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => 'Collapse',
 		'first_article' => 'Skip to the first article',
 		'focus_search' => 'Access search box',
+		'global_view' => 'Switch to global view',  // TODO
 		'help' => 'Display documentation',
 		'javascript' => 'JavaScript must be enabled in order to use shortcuts',
 		'last_article' => 'Skip to the last article',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => 'Navigation',
 		'navigation_help' => 'With the "Shift" modifier, navigation shortcuts apply on feeds.<br/>With the "Alt" modifier, navigation shortcuts apply on categories.',
 		'next_article' => 'Skip to the next article',
+		'normal_view' => 'Switch to normal view', // TODO
 		'other_action' => 'Other actions',
 		'previous_article' => 'Skip to the previous article',
+		'reading_view' => 'Switch to reading view', // TODO
+		'rss_view' => 'Open RSS view in a new tab', // TODO
 		'see_on_website' => 'See on original website',
 		'shift_for_all_read' => '+ <code>shift</code> to mark all articles as read',
 		'title' => 'Shortcuts',
 		'user_filter' => 'Access user filters',
 		'user_filter_help' => 'If there is only one user filter, it is used. Else filters are accessible by their number.',
+		'views' => 'Views', // TODO
 	),
 	'user' => array(
 		'articles_and_size' => '%s articles (%s)',

+ 5 - 0
app/i18n/tr/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => 'Kapat',
 		'first_article' => 'İlk makaleyi atla',
 		'focus_search' => 'Arama kutusuna eriş',
+		'global_view' => 'Switch to global view', // TODO
 		'help' => 'Dokümantasyonu göster',
 		'javascript' => 'Kısayolları kullanabilmek için JavaScript aktif olmalıdır',
 		'last_article' => 'Son makaleyi atla',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => 'Genel eylemler',
 		'navigation_help' => '"Shift" tuşu ile kısayollar akışlar için geçerli olur.<br/>"Alt" tuşu ile kısayollar kategoriler için geçerli olur.',
 		'next_article' => 'Sonraki makaleye geç',
+		'normal_view' => 'Switch to normal view', // TODO
 		'other_action' => 'Diğer eylemler',
 		'previous_article' => 'Önceki makaleye geç',
+		'reading_view' => 'Switch to reading view', // TODO
+		'rss_view' => 'Open RSS view in a new tab', // TODO
 		'see_on_website' => 'Orijinal sitede göster',
 		'shift_for_all_read' => '+ <code>shift</code> tuşu ile tüm makaleler okundu olarak işaretlenir',
 		'title' => 'Kısayollar',
 		'user_filter' => 'Kullanıcı filtrelerine eriş',
 		'user_filter_help' => 'Eğer tek filtre varsa o kullanılır. Yoksa filtrelerin kendi numaralarıyla kullanılır.',
+		'views' => 'Views', // TODO
 	),
 	'user' => array(
 		'articles_and_size' => '%s makale (%s)',

+ 5 - 0
app/i18n/zh-cn/conf.php

@@ -148,6 +148,7 @@ return array(
 		'collapse_article' => '收起文章',
 		'first_article' => '跳转到第一篇文章',
 		'focus_search' => '聚焦到搜索框',
+		'global_view' => 'Switch to global view', // TODO
 		'help' => '显示帮助文档',
 		'javascript' => '若要使用快捷键,必须启用 JavaScript',
 		'last_article' => '跳转到最后一篇文章',
@@ -157,13 +158,17 @@ return array(
 		'navigation' => '浏览',
 		'navigation_help' => '搭配 "Shift" 键,浏览快捷键将生效于 RSS 源。<br/>搭配 "Alt" 键,浏览快捷键将生效于分类。',
 		'next_article' => '跳转到下一篇文章',
+		'normal_view' => 'Switch to normal view', // TODO
 		'other_action' => '其他操作',
 		'previous_article' => '跳转到上一篇文章',
+		'reading_view' => 'Switch to reading view', // TODO
+		'rss_view' => 'Open RSS view in a new tab', // TODO
 		'see_on_website' => '在原网站上查看',
 		'shift_for_all_read' => '+ <code>shift</code> 可以将全部文章设为已读',
 		'title' => '快捷键',
 		'user_filter' => '显示自定义查询',
 		'user_filter_help' => '如果有多个自定义过滤器,则会按照它们的编号依次访问。',
+		'views' => 'Views', // TODO
 	),
 	'user' => array(
 		'articles_and_size' => '%s 篇文章 (%s)',

+ 30 - 0
app/views/configure/shortcut.phtml

@@ -17,6 +17,36 @@
 
 		<noscript><p class="alert alert-error"><?php echo _t('conf.shortcut.javascript'); ?></p></noscript>
 
+		<legend><?php echo _t('conf.shortcut.views'); ?></legend>
+
+		<div class="form-group">
+			<label class="group-name" for="normal_view_shortcut"><?php echo _t('conf.shortcut.normal_view'); ?></label>
+			<div class="group-controls">
+			    <input type="text" id="normal_view_shortcut" name="shortcuts[normal_view]" list="keys" value="<?php echo $s['normal_view']; ?>" data-leave-validation="<?php echo $s['normal_view']; ?>"/>
+			</div>
+		</div>
+
+		<div class="form-group">
+			<label class="group-name" for="global_view_shortcut"><?php echo _t('conf.shortcut.global_view'); ?></label>
+			<div class="group-controls">
+			    <input type="text" id="global_view_shortcut" name="shortcuts[global_view]" list="keys" value="<?php echo $s['global_view']; ?>" data-leave-validation="<?php echo $s['global_view']; ?>"/>
+			</div>
+		</div>
+
+		<div class="form-group">
+			<label class="group-name" for="reading_view_shortcut"><?php echo _t('conf.shortcut.reading_view'); ?></label>
+			<div class="group-controls">
+			    <input type="text" id="reading_view_shortcut" name="shortcuts[reading_view]" list="keys" value="<?php echo $s['reading_view']; ?>" data-leave-validation="<?php echo $s['reading_view']; ?>"/>
+			</div>
+		</div>
+
+		<div class="form-group">
+			<label class="group-name" for="rss_view_shortcut"><?php echo _t('conf.shortcut.rss_view'); ?></label>
+			<div class="group-controls">
+			    <input type="text" id="rss_view_shortcut" name="shortcuts[rss_view]" list="keys" value="<?php echo $s['rss_view']; ?>" data-leave-validation="<?php echo $s['rss_view']; ?>"/>
+			</div>
+		</div>
+
 		<legend><?php echo _t('conf.shortcut.navigation'); ?></legend>
 
 		<p class="alert alert-warn"><?php echo _t('conf.shortcut.navigation_help');?></p>

+ 4 - 0
app/views/helpers/javascript_vars.phtml

@@ -35,6 +35,10 @@ echo htmlspecialchars(json_encode(array(
 		'user_filter' => @$s['user_filter'],
 		'help' => @$s['help'],
 		'close_dropdown' => @$s['close_dropdown'],
+		'normal_view' => @$s['normal_view'],
+		'global_view' => @$s['global_view'],
+		'reading_view' => @$s['reading_view'],
+		'rss_view' => @$s['rss_view'],
 	),
 	'url' => array(
 		'index' => _url('index', 'index'),

+ 4 - 0
config-user.default.php

@@ -56,6 +56,10 @@ return array (
 		'user_filter' => 'u',
 		'help' => 'f1',
 		'close_dropdown' => 'escape',
+		'normal_view' => '1',
+		'global_view' => '2',
+		'reading_view' => '3',
+		'rss_view' => '4',
 	),
 	'topline_read' => true,
 	'topline_favorite' => true,

+ 23 - 0
p/scripts/main.js

@@ -704,6 +704,29 @@ function init_shortcuts() {
 		'disable_in_input': true
 	});
 
+	shortcut.add(shortcuts.normal_view, function () {
+		$('#nav_menu_views .view_normal').get(0).click();
+	}, {
+		'disable_in_input': true
+	});
+
+	shortcut.add(shortcuts.global_view, function () {
+		$('#nav_menu_views .view_global').get(0).click();
+	}, {
+		'disable_in_input': true
+	});
+
+	shortcut.add(shortcuts.reading_view, function () {
+		$('#nav_menu_views .view_reader').get(0).click();
+	}, {
+		'disable_in_input': true
+	});
+
+	shortcut.add(shortcuts.rss_view, function () {
+		$('#nav_menu_views .view_rss').get(0).click();
+	}, {
+		'disable_in_input': true
+	});
 }
 
 function init_stream(divStream) {