Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possibility for keyboard functions in "ipxe's menu system"?
2013-01-04, 09:00 (This post was last modified: 2013-01-04 09:01 by Torgeir.)
Post: #1
Possibility for keyboard functions in "ipxe's menu system"?
Hi!

Was wondering if it could be possible to have/add keyboard functions in ipxe's build in menu system.

Like, "backspace" to go back, instead of having an menu entry "back/prev", with "goto prev_stage".

Makes any sense?

Torgeir
Find all posts by this user
Quote this message in a reply
2013-01-04, 09:23
Post: #2
RE: Possibility for keyboard functions in "ipxe's menu system"?
(2013-01-04 09:00)Torgeir Wrote:  Was wondering if it could be possible to have/add keyboard functions in ipxe's build in menu system.

Like, "backspace" to go back, instead of having an menu entry "back/prev", with "goto prev_stage".

There's no concept of "back/prev" built in to the menu system; it doesn't retain state between menus.

The best way to achieve what you want is probably to include a "back/prev" entry in each of your menus, with the shortcut key set to backspace.

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-01-04, 09:54 (This post was last modified: 2013-01-04 10:17 by Torgeir.)
Post: #3
RE: Possibility for keyboard functions in "ipxe's menu system"?
The concept of shortcut keys is working perfectly Smile
But I cannot get the code for backspace to work. Using the key "b" for testing, works as intended.

For backspace I've tried (both entries):
#define BACKSPACE CTRL_H
#define KEY_BACKSPACE BACKSPACE

Backspace in lowercase.

All examples.

Code:
item --key BACKSPACE prev_stage * Prev
item --key CTRL_H prev_stage * Prev
item --key KEY_BACKSPACE prev_stage * Prev
item --key backspace prev_stage * Prev

Am I missing something?

Torgeir
Nevermind. Found it:

Quote:# grep -R "BACKSPACE" *
hci/editstring.c: case KEY_BACKSPACE:
hci/mucurses/kb.c: case KEY_BACKSPACE :
hci/mucurses/kb.c: case KEY_BACKSPACE :
include/ipxe/efi/Protocol/SimpleTextIn.h:#define CHAR_BACKSPACE 0x0008
include/ipxe/keys.h:#define BACKSPACE CTRL_H
include/ipxe/keys.h:#define KEY_BACKSPACE BACKSPACE
interface/linux/linux_console.c: return KEY_BACKSPACE;

Torgeir
Find all posts by this user
Quote this message in a reply
2013-01-04, 10:28 (This post was last modified: 2013-01-04 10:29 by mcb30.)
Post: #4
RE: Possibility for keyboard functions in "ipxe's menu system"?
(2013-01-04 09:54)Torgeir Wrote:  The concept of shortcut keys is working perfectly Smile
But I cannot get the code for backspace to work. Using the key "b" for testing, works as intended.

As I think you already figured out, you need to use the literal value for backspace (0x08):

Code:
item --key 0x08 prev_stage * Prev

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-01-04, 14:49
Post: #5
RE: Possibility for keyboard functions in "ipxe's menu system"?
Yeah. But thanks anyway Smile

Torgeir
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)