Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Commit

Permalink
Andreas Krennmair:
Browse files Browse the repository at this point in the history
	made space key usable for key bindings
  • Loading branch information
akrennmair committed Jan 19, 2007
1 parent 8c55780 commit 8326ada
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -3,6 +3,7 @@ Changes for newsbeuter:
0.2:
removed an unnecessary mutex lock/unlock that made newsbeuter lock up when the "max-items" config option was set
improved HTML rendering (occasional missing spaces, <pre> tags)
added possibility to use the space key for key bindings

0.1.1 (2007-01-17):
fixed a crash when ISO-8859-1 encoded feeds with umlauts in the title were displayed on systems with UTF-8 locales enabled.
Expand Down
8 changes: 4 additions & 4 deletions doc/newsbeuter.txt
Expand Up @@ -144,10 +144,10 @@ help:?:Runs the help screen.
Keys, as used in the bind-key configuration command, use a special syntax.
Lowercase keys, uppercase keys and special characters are written literally.
The Enter key is written as "enter", while the ESC key is written as "esc". The
function keys F1 to F12 are written as "F1" to "F12". Key combinations with the
Ctrl key, such as Ctrl-R, are written as ^r. Please be aware that all
Ctrl-related key combinations need to be written in lowercase ^R for
Ctrl-Shift-R does not work.
function keys F1 to F12 are written as "F1" to "F12". The Space key is written
as "space". Key combinations with the Ctrl key, such as Ctrl-R, are written as
^r. Please be aware that all Ctrl-related key combinations need to be written
in lowercase ^R for Ctrl-Shift-R does not work.


Example Configuration
Expand Down
4 changes: 3 additions & 1 deletion src/keymap.cpp
Expand Up @@ -107,7 +107,9 @@ operation keymap::get_operation(const std::string& keycode) {
char c;
sscanf(keycode.c_str(),"CHAR(%d)",&x);
// std::cerr << x << std::endl;
if (x >= 32 && x <= 126) {
if (32 == x) {
key.append("space");
} else if (x > 32 && x <= 126) {
c = static_cast<char>(x);
key.append(1,c);
} else if (x >= 0 && x<=26) {
Expand Down

0 comments on commit 8326ada

Please sign in to comment.