Git Product home page Git Product logo

saka-key's Introduction

WARNING: THIS PROJECT IS UNMAINTAINED.

Expect no further fixes or features. Anyone is free to fork, modify, and publish the extension, but please do not reuse the name "Saka Key" without permission. There are many maintained alternatives listed at the bottom.

Why: The original developer does not and will not have the time and motivation to continue.

Saka Key

Saka Key is a Chrome and Firefox extension for keyboard-only web browsing. It's configurable, easy to use, and engineered thoughtfully. Install it from the Chrome Web Store or the Firefox Marketplace. Also read the Saka Key Handbook and try the accompanying tab search extension Saka.

Saka Key Preview

Install

Follow the Development Setup Guide for detailed instructions. Otherwise:

git clone https://github.com/lusakasa/saka-key.git
cd saka-key
npm install
# Option 1. Chrome development build
npm run start:chrome
# Option 2. Chrome production build
npm run build:chrome
# Option 3. Firefox development build
npm run start:firefox
# Option 4. Firefox production build
npm run build:firefox

Credits

MIT Licensed, Copyright (c) 2018 Sufyan Dawoodjee, Neil Macintyre, Brandon Kalinowski

Saka Key is inspired by and derives from

saka-key's People

Contributors

alexherbo2 avatar alliedenvy avatar brandonkal avatar daviddostal avatar eckaaaaaat avatar edjroot avatar eejdoowad avatar gliptak avatar jingyenloh avatar kaylynb avatar neilmacintyre avatar patrickchin avatar pureooze avatar rleppink avatar sempasha avatar siemieniec avatar t754 avatar unicodingunicorn avatar unsolvedcypher avatar yfdyh000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

saka-key's Issues

Cannot bind to ctrl-n

When I try to set a key binding to ctrl-n it opens a new window instead of changing the binding.

Edit: this is not just a bug in the UI to set the binding; editing the underlying storage.js file to make ctrl-n a binding has no effect; this is likely a bug in Firefox.

Accepting renaming profiles with Enter on Firefox fails

If I try to rename a profile (is that what they're called?), and finish by pressing Enter, the name reverts to what it was before. On Chrome, this doesn't happen - it works on that browser. If I try to rename the profile and click somewhere else to finish, the renaming succeeds.

Alt twice does not exit pass keys mode

For me, pressing alt twice does not exit pass keys mode. I'm using version 1.21.3 on Firefox 55.0.3 on Linux. Maybe the key binding for exiting pass keys mode could be configurable? The best workaround I have found is to press Ctrl+f and then Esc which focuses and then blurs the find toolbar returning focus to Saka Key.

Perhaps #33 would solve this by providing a shortcut to enable/disable Saka Key. I'm not sure what the difference between pass keys mode and disabling Saka Key is.

copy current URL?

I might have missed it in the documentation, but is there a way to copy the current URL? Thanks

FEATURE REQUEST: Button to clear/delete all keybindings at once

Hi! Thanks for the wonderful extension.

As I do not use all of the shortcuts that Saka Key offers and I use them with keybindings which differ quite a bit from the default ones, I have to delete all of the existing (default) keybindings which Saka Key provides and then create new keybindings for the shortcuts that I actually use.

This process would be greatly shortened if there was a button on the options page with which I could automatically clear/delete all of the keybindings. After that I could create the keybindings for the shortcuts of which I have use.

Alternatively, the same could be achieved by clearing all keybinding on the 'New' keybindings profile (when I create a new keybindings profile by selecting 'New' from the menu in the settings card options). This way there would be no keybindings selected on the 'New' settings. I think that would make more sense as well, since there already is an option to 'Duplicate' โ€” there is no need for 'New' to work as a sort of pseudo-'Duplicate'.

Sometimes the extension stops responding and have to be restarted

I have no idea what's causing this, but sometimes the extension just stops working on Firefox. To bring it back I have to disable and enable it again โ€“ in its own options, not in the addons manager.

Is there something that I can do to help you debug this?

Key command to focus omnibar

Opening a new tab focuses the omnibar for you, but there are cases when I do not want to open a new tab but replace the current tab with a page. The "F6" key does exactly this in vanilla Firefox.

Doesn't work with Google Docs

Firefox 55.0.3 (64-bit)
OpenBSD 6.1-stable
'power' Saka Key profile

I'm unable to edit a Google Doc while Saka Key is enabled. After I open the Google Doc in Firefox and start typing, none of my keypresses are passed through to the doc, instead they seem to be intercepted by Saka Key. Pressing ':' or ';' to pass all the keys through doesn't seem to do anything.

Improve Link Hints Performance

Todos:

  • Switch to Canvas-based renderer to maximize rendering performance (by sidestepping the DOM)
  • Minimize messaging overhead (by adding local tab fast track using window.postMessage to Mosi)
  • Move all rendering to a single frame: either the top-level frame or the frame containing the fullscreen element.
  • Explore strategies for finding hintable elements faster.

Does not respond to key presses in Firefox

Upon upgrading to Saka Key 1.20.0, the add-on no longer responds to key presses on any page. I am using Nightly 2017-08-29. I have tried toggling the add-on from the Saka Key's pop-up window, the add-ons manager, and Saka Key's options page.

I don't know where else to begin with troubleshooting, so if you would like me to try anything else or provide further information, let me know.

Bind JS scripts/bookmarklets? (for pocket integration)

Hi,
looking at the structure of this wonderful plugin it seems trivial to add some custom js, but can you hint me at where to add it (without loosing it with updates etc) and how to bind it?

Simply triggering a bookmarklet-style js and bind it to a key would be great!

I want it to add pages to pocket via (contrary to their old bookmarklet, this undocumented url still works):
javascript:(function(){window.open('https://getpocket.com/edit?url='+escape(window.location.href)', '_self');})

Additional things that would be nice:

  • pass a URL from hint mode instead of using window.location.href (I'd use a new tab with target _blank than)
  • load the page in a background tab (or better yet, just send a get request, but never actually show it)
  • pass some arguments as tags, but I'm not sure where that could be added in saka-key. The js with <args> would be: javascript:(function(){window.open('https://getpocket.com/edit?url='+escape(window.location.href)+'&tags=<args>', '_self');})

Thank you so much for providing an alternative to the other keyboard-wizardry add-ons that are now becoming legacy. I thought I'd leave FF behind for good (and install your extention on chrome, hehe) and I'm so happy I can stay!

Feature request: disable per-tab

I have been using it for a couple weeks and Saka Key seems like a great replacement for VimFX so far!

One feature I just realized that Saka Key doesn't seem to have is disabling on selected tabs. In VimFx one was able to set a list of pages on which it is disabled; this is useful for example in gmail where the already-provided keybindings are quite good. (There was also the option to disable only some keys, but that would be another level of complexity.)

The extension slows page loading in Firefox

When the extension is enabled, general page loading times are greater. This is mostly noticeable because of the deferred loading of styles, as seen in the screen recording below.

Screen recording: http://d.pr/v/mJACd

In this screen recording, I first reload the page 2x with Saka Keys enabled and then 2x with the extension disabled. With Saka Keys enabled we can see the HTML structure without the styles applied and after a flicker the proper page layout. With Saka Keys disabled we get the proper page layout with the styles applied without any flickering.

For reference, I'm using Firefox Nightly 57.0a1 and Saka Key 1.20.0rc.

Using "Scroll half page up" makes scrolling stuck on some pages

Steps to reproduce:

  1. Visit a page where the bug happens (I've seen it on a few, right now can only remember github issues pages)
  2. Scroll down a little
  3. Scroll back up using "Scroll half page down"
  4. Now try to scroll back down using the normal "scroll down" key

The page scrolls down but automatically scrolls up again, as if I were still pressing the "u" key (in the case of the vimium profile)
output

Only seems to affect Firefox.

Allow installing permanently on firefox

The current installation instructions for firefox result in the addon only being installed until the browser is closed. Please take a look at my PR for updated instructions.

Vimium keybindings on Firefox don't work?

I just installed Saka Key 1.19.0rc on Firefox 56.0b6 (Linux, 64bit). Using the 'default' and 'power' keybindings, Saka Key works. But when I switch to the vimium keybindings Saka Key doesn't react to any keypress anymore.

Todo: More/better Keybinding profiles

I only use Saka Key's default keybindings profile. The result is that the other profiles are neglected and not updated when new commands are introduced.

A simple, but helpful, way to contribute would be to improve the keybinding profiles defined in https://github.com/lusakasa/saka-key/blob/master/src/options/Keybindings/default.json by

  1. updating/improving the power and vimium profiles
  2. replacing the one hand profile with two separate left-hand and right-hand profiles
  3. adding your own profiles

Defining bindings is simple. Just look at the existing ones for examples. For each key in a binding, you must specify the "key" and "code" attributes, and any modifier keys that are true.

You can determine "key" and "code" by executing document.addEventListener('keydown', ({ key, code }) => console.log({ key, code })) into any page in a private/incognito window, then typing the key.

Switch to 'nth' tab in one shortcut

Currently, at least on Firefox, it seems that only switch to first and last tab is implemented. I imagine it would be easy to implement a shortcut for tabs 2 though 9 as well, just like how in normal firefox you can use 'cmd/alt+n' to get to the nth tab.

FEATURE REQUEST: Export/settings from file

Hi! Thanks for the wonderful extension. It has changed the way I use my browser.

However, it is incredibly annoying to repeatedly specify the settings after each update that the extension receives.
One workaround (perhaps just for the period during which Saka key is receiving constant updates) would be to have a button to export/import the settings to/from an external file.

This would greatly improve the experience of actively using the extension, for me at least, since I use bindings which differ quite a bit from the default ones.

Feature Request: Indicate in the toolbar button when "passing keys to page"

In VimFx, when the user hits the shortcut to "pass keys to page" the icon in the toolbar has its color changed, indicating that VimFx is now in "stand by". This is very handy as it provides a clear feedback of the current status of the extension. That said, it would be great if you could replicate this behavior in Saka Keys.

For reference, VimFx has actually three color states for its icon:

  • Colored: the extension is active
  • Gray: the extension is disabled for the current page (because of Firefox limitations or because the URL is blacklisted in the settings page)
  • Red: the extension is in "ignore mode", the corresponding status for "passing keys to page"

Autofocus in input form

Hey, great job @eejdoowad.

I'd like to request a feature that I haven't seen in Saka Key. With vimperator, I can do g + i and it autofocuses to input forms. This is basically a shortcut for f and pressing the hint number for the form.

doesn't work with Firefox 'Reader View'

First of all, if you haven't tried it, you should. :) Firefox 'Reader View' is awesome--it gets rid of all the distraction an a page, and just presents the text of the article you're trying to read, without ads, without distractions, you can just read the content. I was slow to adopt it, but now I love it and I use it all the time, as often as I can.

Unfortunately, Saka Key stops working after I go into Reader View on a page. I'm not sure if its even possible to fix this in a WebExtension world, but it would great if so.

Outdated documentation regarding hints

According to the documentation, the hints command has many variatons which alter the way the element is clicked (Open Link, Open Link in Background Tab, Open Link in Foreground Tab...) and the default binding is FF. On the options page though, the default binding is ALT+F for opening the link and there's no way (apparently) of invoking the other variations.

Open context menu on links with shortcut

In VimFx, there is a feature that allows me to open the context menu on a hyperlink (the equivalent of right-clicking on a link). By default, it can be done with the shortcut ec.

Would it be possible to implement the same behaviour in Saka Key as well?

I've already figured out I can use the "Focus link" feature by setting a shortcut in Saka Key, which brings me quite close to this, but I don't know how to "unfocus" the link.

Options export in Firefox hangs

When attempting to export settings from the Saka Key preferences page (from the Add-ons Manager page in Firefox, not the popup in the hamburger menu), the tab doesn't finish loading.
If I try to export settings from the popup (which the extension urges that it not be used), it works fine. The preferences page also works on Chrome, so this is a Firefox-specific issue.

I'm on Firefox 55, Saka Key 1.21.3.

Ctrl+[ not recogized as Escape character

From Esc key - Wikipedia

the Esc key (named Escape key in the international standard series ISO/IEC 9995) is a key used to generate the escape character (which can be represented as ASCII code 27 in decimal, Unicode U+001B, or Ctrl+[)

I use Ctrl+[ as my escape key with vim, vimperator, vimfx, and chromes vimium and cVim.

I would really like to use this with saka-key on firefox nightly (at time of writing firefox 58).

It seems fire firefox has a default keybinding for Ctrl+[ which switches tabs, I cannot find any extension for removing this keybinding for this version of firefox.

I would be happy to implement this. I would greatly appreciate being given a few files / line numbers to look at for implementing this.

Two options I see:

  • Add Escape key as a category in the keyboard config and add the implementing logic
  • Quick and dirty: Add Ctrl-[ as an escape key where ever Escape is currently being processed.

Thanks for the great plugin!

Feature Request: options to set Saka Keys off/on by default and turned on/off via a hotkey

It would be great to have the option of making Saka Keys off/on by default and turned on/off via a configurable hotkey. This will allow different users to use it differently. For example: power user could set it to "default on" and only disable it on specific pages (similar to using the passing all keys hotkey); casual users could set it to "default off" and only turn it on via a hotkey on specific pages.

Some input fields can not be focused when using the preference to prevent pages stealing focus

When the preference to prevent pages stealing focus is used, some input fields can not be focused using hints. Some examples:

  1. www.google.com -- the main search box
  2. www.duckduckgo.com -- the main search box
  3. www.gmail.com -- click on "Sign in", then the "email or phone" box can not be selected.

When the focus stealing setting is off, these fields can be focused with hints.

With Vimium-FF, some pages would steal focus in a way that blocked all keys from working if the focus stealing preference was not on (see philc/vimium/issues/2613), so I just turned on in Saka Key to start out. I will leave it turned off now and see if Saka Kay handles these kinds of pages better.

TODOs: A list of tasks sorted by difficulty to make Saka Key better

Easy:

  • Create proper left hand, right hand, Vimium, and Vimperator Keybinding profiles
  • Document in Handbook which pages Saka Key doesn't work on, #94
  • Add command for opening multiple background tabs, #157

Medium

  • On the options page, separate Enabling/Disabling Saka Key from the General Profile
  • Validate options when you import them
  • Make sure default hint appearance looks same with and without CSS and on different OSs
  • Add commands for clicking previous and next links
  • add quick disable/enable key command
  • Instead of opening info page on updates, send a notification that can be clicked on to navigate to the options page
  • add command for quickly changing active profiles
  • Make Pass mode exit keys configurable and change default to something other than ALT (which defocuses the tab on Windows)
  • Add status icon described in #22
  • Show available actions based on last key pressed, #86
  • Respect physical keys setting when resolving hint characters, #92

Hard

  • Add support for activating links by link text , #32
  • add support for scrolling pages without smoothscroll polyfill (which can only scroll the scrollingElement, not subelements)
  • add support for selecting and focusing iframes
  • properly simulate hovers to make mouseover menus usable with link hints
  • Analyze which version of firefox and chrome Saka Key is compatible with
  • Add category headers to quick navigation pane on left side of options gui
  • Add Vimium style help page (but make it searchable and full screen)
  • Add command for switching between profiles without opening options gui
  • Add historical tab switching commands
  • Implement proposal here
  • Integrate pdf.js to enable scrolling
  • Make Saka automatically work in all open tabs after updates without requiring reloading
  • Add "Open multiple links command" and make it possible to use modifier keys to change how a link is opened, see #44
  • Activate selected text, see #47
  • Add Text Mode commands, see #87

Rockstar

  • Port the performant VimFX Algorithm for finding hintable elements
  • Add find mode to search for text on pages, triggered by forward slash '/', see #25.
  • Add visual/caret mode for selecting text, see Vimium's docs
  • Add GUI widget that lists available keybindings based on state of input trie
  • Add per-domain configurations
  • Figure out all situations in which ports to the background page close and add functionality to gracefully restart.
  • Use semantic markup and ARIA landmarks to provide more intelligent shortcuts
  • Look into using MutationObservers and IntersectionObservers to pre-load and cache link hints
  • Add support for user-defined commands
  • Add support for commands triggered by hints mode, see #45.
  • Add commands for controlling videos (pause, play, volume), might want to separate into its own extension
  • Make hintable elements customizable per-domain

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.