[haiku-bugs] Re: [Haiku] #15294: Terminal should provide an emulated Meta key

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sun, 25 Aug 2019 03:54:57 -0000

#15294: Terminal should provide an emulated Meta key
-------------------------------------+----------------------------
   Reporter:  simonsouth             |      Owner:  jackburton
       Type:  enhancement            |     Status:  new
   Priority:  normal                 |  Milestone:  Unscheduled
  Component:  Applications/Terminal  |    Version:  R1/Development
 Resolution:                         |   Keywords:
 Blocked By:                         |   Blocking:
Has a Patch:  0                      |   Platform:  All
-------------------------------------+----------------------------
Comment (by simonsouth):

 The input-filter mechanism isn't nearly as flexible as I imagined and
 won't be of use here.

 What I have done is follow Jérôme's suggestion and create a patch that
 makes the Input Server notify applications when a new key map has been
 loaded, using a newly defined message, B_KEY_MAP_LOADED:

 https://review.haiku-os.org/c/haiku/+/1741

 (Note B_KEY_MAP_CHANGED is [https://www.haiku-os.org/legacy-
 docs/bebook/TheInputServer_Messages.html#KeyboardDeviceControlMessages
 already taken].) The patch uses BRoster::Broadcast() to send the message
 to every application that's running. This appears safe and seems to work
 fine, but I'm open to feedback if there's a better approach.

 I've also updated my patch for Terminal to have TermApp simply listen for
 B_KEY_MAP_LOADED and forward the message to its TermWindow when it
 arrives. This allows the node monitor to be dispensed with altogether, and
 feels like a much more elegant solution. Those changes can be seen here:

 https://review.haiku-os.org/c/haiku/+/1727
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15294#comment:7>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: