bpm's Operations Room

understanding & extending Opera

Help popup menus: KB+codes

,

Here's a menu you can add to your menu bar with keyboard information, and charts of escape codes, Opera variables and HTML entities.

Putting this in the menu tree gives you very quick, non-disruptive access to information panels.

Unlike page-based help, menus are memory-resident and ready to go. Unlike javascript alert boxes, they can be accessed at any time - even with a blank screen, or Notes or sourceview open. Unlike side-panels, which shove your page to one side and force a reflow of content, then another reflow when dismissed, they pop up in the foreground and vanish without commotion. And the commands which access them are both efficient - Alt+k,e for example - and explained onscreen: a great combination, making menus keyboard-quick once you know your way around, but transparently guiding for the novice. In Opera, menus are used only as command attachment points - so it is a repurposing to exploit them for primarily informational charts. Capacity is limited and the command-centric format is rather tedious to work around - but in some cases, I think worthwhile for want of any other method as quick, convenient and unobtrusive. So here's a little menu subsystem which is both useful (in its modest way) and a demo of technique. As often happens, I am compelled to point out larger meaning. If memory-resident popup help is, essentially, an always-justified feature - which it is, for things like this which require frequent brief consultation - why isn't it always provided? Bill Gates made "information at your fingertips" a slogan - but help in Windows (my old version anyway - but still the product of a decade or more of thought and effort) is an unusably awkard contraption that groans and heaves its way on to the screen; and Opera devs never notice that their implementation of menus leaves out the whole informational category. And the answer is, as usual, an immaturity of culture, with two parts: a particular cavity in absorbed images of what's proper in some area, and an encompassing naivety about the meaning of the feelings and behavior such cavities generate. Meet the norms of your culture, and you'll feel competent. Its blind spots will be your blind spots, and if they're pointed out your eyes will go glassy: valid argument you are not equipped to process. And that's the basic mechanism of herdfaith and social inertia - and the only reason you don't have a popup keyboard chart. Setup
  • copy the listing from the code box below (quadruple click anyhwere in the box to select it all), and paste into your menu.ini file
  • add the line Submenu,"Kb+codes", Kb+codes menu to your Browser Menu Bar section
  • feel free to change anything as appropriate
technical notes
  • an ampersand in the caption of a menu line (the second element of the line, in quotes - what appears on the menu) causes the following character to become the underlined selector
  • Opera scans your menu and keyboard files for matching actions, and shows the keystrokes for lines which have a match on the menu. To exploit this, make sure that the action specification is the same in both places: sometimes Opera will figure out equivalence even when strings are not identical, but not always
  • items which are active are indicated by an icon (although in the case of the Merge Notes function its appearance is intermittent, for reasons I have yet to grasp).
  • keyboard assignments are mine - those of the 9.2-compatible keyboard, unless marked "custom". I don't support the new keyboard, in any sense. I have used the name parameter (after third comma) as a place to put in comments identifying custom assignments. You can treat them as suggestions, or delete them. (I've put in Stop commands as fictitious actions for these menu lines to get Opera to display the Stop icon - your signal that the line is not a default assignment.)
  • you can assign any menu in your system to any gesture - keystroke, mouse gesture, toolbar button, or menu line - using the "show popup menu" command. Syntax: show popup menu,"whatever menu". An example of a menu in this set which is also accessed another way is the Notes-panel menu - which I also have as a dropdown from a button on the panel toolbar.
  • the Showcode line launches a function which will open the menu file, and search out the menu from which it was invoked - it is a way of inspecting and editing the source code of menus and toolbars. To use it, you need to nickname your menu file "menu", and make sure that Opera is set up to open INI files. More here: Showcode: click to see inside toolbars and menus
Contextual observation I've tried to optimize menu selectors - well-chosen selectors will be consistent with keyboard assignments, and easy to remember and execute. A person who spends time and thought weighing these considerations cannot help but notice another cavity: OperaCorp pays no attention whatsoever to selector assignment - allowing a mindless machine algorythm to determine what gestures are associated with what functions (which, if you think about it, is one of the fundamental functions and challenges of software). In some cases the results are merely clumsy: Open, Open in New Tab and Open in Background are effected by O, P and E because the algorythm just scans until it hits an unused character. Random, but at least coherent locally. But in some cases the incoherence is really intense. Here are some context-menu selectors used in the Bookmarks and Notes panels:
Item Folder Separator Select all
Bookmark W F R
Note N W A E
Note Folder N E W S
So these commands are not consistent from one panel to the next, not even consistent from one line to the next - let alone throughout the system. Learning a system like this is pretty much hopeless: what you learn is that you have to concentrate, scan, and locate - every time. The number of random facts it takes to specify the system - facts you have to absorb to be fluent - is greatly increased; we could call that the chaoticity index. Order doesn't emerge by accident; it doesn't emerge at all, unless people have an instinct to order. [/LIST]
[Kb+codes Menu]
Item, "___ Codes ___"
submenu, "Escape codes", escape codes menu
submenu, "Opera variables", Opera variables menu
submenu, "HTML entities", HTML entities menu
----------------------1
Item, "__  Keyboard & gesture __"
submenu, "page &Navigation", Page navigation kb menu
submenu, "page &Launch", page launch kb menu
submenu, "&Closings", closings kb menu
submenu, "&Dialogs", Dialog kb menu
submenu, "edit &Mode", edit kb menu
submenu, "Notes panel", Notes gesture menu
---------------------2
Item, "move left|up / right|down:  1 / 2"
Item, "navigate tab history:  Z  X"
Item, "show tab history back/forward: Alt Z/X"
Item, "temporal prev/next tab (popup cycler):  Alt 1/2"          = stop,,,"custom"
---------------------3
Item, "edit properties:  Alt+Enter, Ctrl+i"
Item, "focus page + restore address: Esc"
Item, "parent directory: Ctrl+Backspace"
---------------------4
Item, "Z: showcode"="new page,,,,"no icon" & go to page, "menu" & find & insert, "Kb+codes Menu*""

[Escape codes menu]
Item, "space:%20"=insert,"%20",,,"dropdown button skin"
Item, "colon:%3A"=insert,"%3A",,,"dropdown button skin"
Item, "less than:%3C"=insert,"%3C",,,"dropdown button skin"
Item, "greater than:%3E"=insert,"%3E",,,"dropdown button skin"
Item, "quotes:%22"=insert,"%22",,,"dropdown button skin"
Item, "single quote:%27"=insert,"%27",,,"dropdown button skin"
Item, "ampersand:%26"=insert,"%26",,,"dropdown button skin"
Item, "comma:%2C"=insert,"%2C",,,"dropdown button skin"
Item, "?:%3F"=insert,"%3F",,,"dropdown button skin"
Item, ";         %3B        equals  %3D"
Item, "@       %40        #          %23"
Item, "[         %5B        ]          %5D"
Item, "+        %2B        $         %24"
Item, "%       %25         ^         %5E"
Item, "`         %60         ~        %7E"
Item, "{         %7B         }         %7D"
Item, "/         %2F         \         %5C"
Item, "|         %7C"

[Opera variables menu]
Item, "%c  clipboard"
Item, "%t  text selection"
Item, "%s  source cache filename "
Item, "%s  text selection (search)"
Item, "%l  link URL"
Item, "%u  URL"
Item, "capital: add quotes"

[HTML entities menu]
Item, "+ means ampersand"
Item, "<  +lt;"
Item, ">  +gt:"
Item, "_  +nbsp;"
Item, "+  +amp;"

[Page navigation kb menu]
Item, "scroll:  Up / Down"
Item, "up/down by page: Space/Shift+Space"
Item, "top/bottom of page: Home / End"
Item, "+/- link:  A/Q"
Item, "+/- header:  S/W"
Item, "+/- element:  D/E"
Item, "+/- frame:  3/Shift+3"
Item, "Inline find:  . and /text  ,links"

[Page launch kb menu]
Item, "Enter or space: follow selected link"
Item, "Open in Current/New/Background tab:"
Item, "from bookmark PANEL: rightclick, O/P/E"                     = stop,,,"selectors on Opera context menu are random; mine are initials"
Item, "from bookmark MENU: Enter/S+Enter/S+C+Enter"
Item, "... or click/S+click/S+C+click"
Item, "... or Underlined/Shift+UL (but not S+C+UL)"
Item, "Go to nickname (scanning)"=go to nickname

[Closings kb menu]
Item, "Close, move right|down"=close page,,,,"stop" & switch to next page                      ,,,"custom: c on my keyboard"
Item, "Close, move left|up"=close page,,,,"stop" & switch to previous page                       ,,,"custom: Shift+c on my keyboard"
Item, "Close, return to previous"=close page,1
Item, "Close page, keep blank window"=Open url in current page, "about:blank"    ,,"custom: Alt+SHift+c for me",stop

[dialog kb menu]
Item, "navigate panels: Alt+1/Alt+2"         =stop,,,"custom: CycleToPrev/Next, wherever you have them"
Item, "navigate features: Tab/Shift+Tab"
Item, "click button: Shift+Enter"
Item, "toggle checkbox: Space"

[edit kb menu]
Item, "Alt: word ops"
Item, "Ctrl: line ops"
Item, "Shift: add range"

[Notes gesture menu]
Item," _____ keyboard navigation _____
Item, "navigate list: initials, Up/Down, Hm/End"
Item, "select folder, single-folder pane: Enter"
Item, "move between panes&: Tab / Shift+Tab"
Item, "jump to edit pane: Enter"
Item, "open &/ close folder: right/left"
Item, "open / close all folders: Shift&+right/left"
Item, "_____ editing _____
Item, "Cut text to note: CM,x. Goes to bottom&." = stop,,,"refers to custom command in Edit popup"
Item, "Copy text to new note: drag excerpt to list"
Item, "Drag text or note into note: impossible, except note into itself"
Item, "Copy selected item(s): Ctrl+drag"
Item, "Move selected item(s)&: Drag"
Item, "Clone note: select,copy,paste"
Item, "Merge selected notes: CM,m" = cut,,,,"panel toggle skin right" & previous item,,,,"panel toggle skin right" & new note & paste & focus previous widget

recurrent bookmark file surpriseThe mystery button: a dynamic HTML demo

Comments

dapxin Thursday, August 28, 2008 6:12:20 PM

Terrific critique. Ha!

dapxin Wednesday, November 25, 2009 7:42:04 AM

this does seem to break in ver 10.10.

bpm Wednesday, November 25, 2009 4:30:24 PM

works in 10.1 here, Dapxin; is it not on menu bar (suggesting custom file isn't loading), or what?

dapxin Wednesday, November 25, 2009 4:38:32 PM

It just doesnt load. It shows right on the menubar but nothing pops down, onClick.

bpm Wednesday, November 25, 2009 5:13:31 PM

Since the menu is nothing unusual and works here, seems the problem must be your file... Menu there? Submenu line in menu bar section agrees with its name?

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.