Comments (6)
Try these:
window.goDoCommand('cmd_scrollTop');
window.goDoCommand('cmd_scrollBottom');
window.goDoCommand('cmd_moveUp2');
window.goDoCommand('cmd_moveDown2');
window.goDoCommand('cmd_moveTop');
window.goDoCommand('cmd_moveBottom');
I tested the move commands with the following text in the compose window.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
Reference...
http://searchfox.org/mozilla-esr78/source/dom/base/nsGlobalWindowCommands.cpp
http://searchfox.org/mozilla-esr78/search?path=ShortcutKeyDefinitions.cpp
from tbkeys.
Thanks a bunch! I think I can do what I need with these!
Re: the first point, I wrote it poorly: what I really need is to be able to go to the top and bottom of the message list. Any way to do these? cmd_scrollTop
/cmd_scrollBottom
scrolls the current message (which is also useful).
from tbkeys.
Try these:
- move thread pane selection to top
(function () {
var tree = window.document.getElementById('threadTree');
tree.ensureRowIsVisible(0);
tree.view.selection.select(0);
})();
- move thread pane selection to bottom
(function () {
var tree = window.document.getElementById('threadTree');
var rowCount = tree.view.rowCount;
tree.ensureRowIsVisible(rowCount - 1);
tree.view.selection.select(rowCount - 1);
})();
- move thread pane selection up a page
(function () {
var tree = window.document.getElementById('threadTree');
var currentIndex = tree.view.selection.currentIndex;
var pageUpIndex = currentIndex - (tree.getPageLength() - 1);
if (pageUpIndex < 0) {
tree.ensureRowIsVisible(0);
tree.view.selection.select(0);
} else {
tree.ensureRowIsVisible(pageUpIndex);
tree.view.selection.select(pageUpIndex);
}
})();
- move thread pane selection down a page
(function () {
var tree = window.document.getElementById('threadTree');
var rowCount = tree.view.rowCount;
var currentIndex = tree.view.selection.currentIndex;
var pageDownIndex = currentIndex + (tree.getPageLength() - 1);
if (pageDownIndex > rowCount - 1) {
tree.ensureRowIsVisible(rowCount - 1);
tree.view.selection.select(rowCount - 1);
} else {
tree.ensureRowIsVisible(pageDownIndex);
tree.view.selection.select(pageDownIndex);
}
})();
from tbkeys.
Thank you! Everything is working as I need to now, except one thing. I bound Home/End to line beginning/end in Compose key bindings
:
{
"home": "cmd:cmd_moveUp2",
"end": "cmd:cmd_moveDown2"
}
They work as expected, but Shift+Home/Shift+End select till document beginning/end instead.
How can I fix this?
from tbkeys.
I don't understand what you are asking.
Here are the default commands for those shortcuts on Windows.
- home - go to beginning of line
- end - go to end of line
- shift+home - select to start of line
- shift+end - select to end of line
Try the following compose key bindings in settings using the tbkey addon.
{
"home": "window.alert('home');",
"end": "window.alert('end');",
"shift+home": "window.alert('shift+home');",
"shift+end": "window.alert('shift+end');"
}
If the example works correctly, then change the commands to whatever you want.
from tbkeys.
Got it! Case closed:
{
"home": "cmd:cmd_moveUp2",
"end": "cmd:cmd_moveDown2",
"shift+home": "cmd:cmd_selectUp2",
"shift+end": "cmd:cmd_selectDown2"
}
from tbkeys.
Related Issues (20)
- ctrl + a stopped working after installing the addon
- moving to junk folder HOT 3
- Settings lost after TB update - how can I restore tbkeys settings from a profile backup? HOT 2
- Shortcut for "View->Message Body As->All Body Parts"? HOT 2
- [SOLVED] Command to quit app HOT 7
- [SOLVED] Alt-F in Inbox Tab opens a forward message window rather than opening File menu HOT 2
- How can I set up a keyboard shortcut to call the `copy_link_1` command in cb_thunderlink? HOT 4
- Disable Ctrl-Enter? HOT 1
- Adding ToggleMessageTag HOT 2
- Open html file in browser? HOT 4
- Get all messanges from all boxes? HOT 1
- Updated key bindings not reflected in TB menus HOT 2
- [question] how can I collapse / expand all mail accounts? HOT 1
- How to trigger a menu item? HOT 4
- Command to preformat text? HOT 3
- Question: (How) can I simulate a modfier + key with a tbkeys single key shortcut? HOT 9
- Prevent thread expansion with j/k navigation keys HOT 3
- JS: Set caret position in "Caret browsing" mode HOT 2
- Shortcuts being triggered in the new Search field HOT 2
- Context for eval HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tbkeys.