[ALL PLATFORMS ] Defaulting to highlight "Done" key on virtual keyboards
#1
Lightbulb 
Elan implemented a small but smart change the the OS X version of XBMC yesterday:
Quote:[OS X] Support for defaulting to highlight "Done" key on virtual keyboards.
What this does is default to highlighting to the "Done" key (instead of the "a" key) which makes using a physical keyboard natural as with this change pressing the "Enter" key now clicks in the "Done" key (instead of the "a" key)

What do you guys think about making this change to all of XBMC platforms?
...highlight "Done" key (instead of the "a" key) by default on Xbox, Linux, and Windows.

Modified: branches/linuxport/XBMC/xbmc/GUIDialogKeyboard.cpp
===================================================================
--- branches/linuxport/XBMC/xbmc/GUIDialogKeyboard.cpp 2008-03-11 06:54:40 UTC (rev 12012)
+++ branches/linuxport/XBMC/xbmc/GUIDialogKeyboard.cpp 2008-03-11 06:55:43 UTC (rev 12013)
@@ -72,6 +72,13 @@
Code:
void CGUIDialogKeyboard::OnInitWindow()
{
+#ifdef __APPLE__
+  // Override skin defaults to always make the defaul control 'DONE' to allow
+  // natual entry on keyboards.
+  //
+  m_dwDefaultFocusControlID = 300;
+#endif
+
  CGUIDialog::OnInitWindow();

  m_bIsConfirmed = false;
@@ -99,7 +106,11 @@

bool CGUIDialogKeyboard::OnAction(const CAction &action)
{
-  if (action.wID == ACTION_BACKSPACE)
+  if (action.wID == ACTION_BACKSPACE
+#ifdef __APPLE__
+       || action.wID == ACTION_PARENT_DIR
+#endif
+     )
  {
    Backspace();
    return true;
@@ -177,6 +188,7 @@
bool CGUIDialogKeyboard::OnMessage(CGUIMessage& message)
{
  CGUIDialog::OnMessage(message);
+

  switch ( message.GetMessage() )
  {
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#2
i thought pressing enter always entered the text and quit with a physical keyboard.

what am i missing?
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
I was under the same impression, Nuka1195, though I admit I haven't bothered checking it. There should be code in CGUIDialogKeyboard.cpp (OnAction I think) for picking that up.

Perhaps it's the changes to CApplication::OnKey() that is actually the factor in this case. I've notified elan of this, so we'll see what happens there.

In either case, it doesn't make much sense to default it in the code - far better to default it in the skin IMO.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
would say that defaulting to enter instead of "a" gives me mixed feelings.

1. when I open the keyboard, I do so to enter text, therefor focus on "a" seems logical.

2. with enter focused, It would be quicker to get to shift, caps, symbols if i were to enter those.

think it's just what you get used to. Smile
Reply
#5
IMHO if a user uses a physical (USB) keyboard then defaulting to "Done" is the logical and intuitive choice so why not just change that to the default for everyone?

My 2 cents Big Grin
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
The point we're making is:

You shouldn't have to default to anything for a USB keyboard. Pressing Enter should do "Done" anyway, no matter where focus is on the dialog.

This allows focus to be placed in the best position for the other control options (gamepad/remote etc.)

Hope this clears things up.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
[ALL PLATFORMS ] Defaulting to highlight "Done" key on virtual keyboards0