From: Bernd Haug <bernd.haug@xaidat.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: org-present key bindings for Logitech R400 handheld presenter
Date: Mon, 30 Mar 2015 16:06:15 +0200 [thread overview]
Message-ID: <CAKjxQA1SMvbJ2atX3KZub=ip5+k8nOC3L4it7vbZ__GEd7fHtg@mail.gmail.com> (raw)
I made myself a .emacs snippet with some bindings for using a Logitech
R400 presenter with org-present; maybe some of you can use this, too.
Minor questions noted below.
---------
(defun my-on-org-mode ()
(local-set-key (kbd "<f5>") 'org-present))
(defun my-on-org-present ()
(org-present-big)
(org-present-read-only)
(org-display-inline-images)
(local-set-key (kbd "<next>") 'org-present-next)
(local-set-key (kbd "<prior>") 'org-present-prev)
(local-set-key (kbd "<escape>") 'org-present-quit)
(local-set-key (kbd ".") 'org-present-beginning))
(defun my-on-org-present-quit ()
(local-unset-key (kbd "<next>"))
(local-unset-key (kbd "<prior>"))
(local-unset-key (kbd "<escape>"))
(local-unset-key (kbd ".")))
(add-hook 'org-mode-hook 'my-on-org-mode)
(add-hook 'org-present-mode-hook 'my-on-org-present)
(add-hook 'org-present-mode-quit-hook 'my-on-org-present-quit)
---------
1) The R400 just sends <f5> and <escape> alternatingly on the
start/stop presentation button. If you get it in a mixed up state so
that it toggles the wrong way around, just turn it off (on its side)
and on again. First stroke will always be "<f5>".
2) Originally I wanted to provide toggling read only using the last
key (lower right on the presenter, "temporarily blank"). Didn't work
This way:
----
(defun my-org-present-ro ()
(interactive)
(local-set-key (kbd ".") 'my-org-present-rw)
(org-present-read-only))
(defun my-org-present-rw ()
(interactive)
(local-set-key (kbd ".") 'my-org-present-ro)
(org-present-read-write))
; + calling my-org-present-ro instead of org-present-read-only in
my-on-org-present
----
For me, no issue practically speaking, since I pretty much always want
R/O anyway, but out of curiousity – what was I doing wrong?
Cheers, Bernd
--
Senior Software Engineer
Xaidat GmbH
Wickenburggasse 5
8010 Graz
Austria / Europe
web: http://www.xaidat.com/
phone: +43-676-845023-706
email: bernd.haug@xaidat.com
FN 384295s, LG ZRS Graz
UID-Nr. ATU67414611
reply other threads:[~2015-03-30 14:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKjxQA1SMvbJ2atX3KZub=ip5+k8nOC3L4it7vbZ__GEd7fHtg@mail.gmail.com' \
--to=bernd.haug@xaidat.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).