|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Using Keystroke API call...how do you send non-printable chars?
I'm assuming that this call allows you to send all keypresses, including up arrow, down, right, enter, pageup, pagedown....but how do I know what the string is that represents those? Is there some master table somewhere?
|
#3
|
||||
|
||||
The key names are from Java's java.awt.event.KeyEvent.
You can hard code names like "Left", "Alt", "F4", etc. If you want to make sure the text gets localized, you could probably use the KeyEvent's getKeyText() and getKeyModifiersText() calls to get the names of the keys you want, using key values like java_awt_event_KeyEvent_CTRL_MASK or java_awt_event_KeyEvent_VK_LEFT. The default STV uses java_awt_event_KeyEvent_getKeyModifiersText() to assign keystroke commands depending on which Hauppauge remote is selected. - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#4
|
|||
|
|||
Excellent, thanks! I see it now.
|
#5
|
|||
|
|||
Well ok....I thought that I saw it...
The good news is that I am able to pass a keystroke through...the bad news is what it does. If I pass through "Down", and I set false so that it sends only to Sage, then what happens is a dialog box comes up, with the letter D on it. If I send "Escape", it does the same, but with E. So, I figured out that it's literally sending the letter "D" and "E", and that causes the dialog box to come up like you're entering search text. If I change the parameter to true, though, so it sends it to the system instead...then it works on whatever window I have up. So, "Escape" actually does escape out of that window, "Enter" selects the highlighted item....it works great. So, the text I'm passing to the Keystroke utility call works like it should on the system, but when I use it on Sage only, it doesn't. Any ideas? |
#6
|
|||
|
|||
Greg, or someone....can you test the Keystroke utility API function in Sage and confirm it works? When I send it a keystroke name (say "Escape"), it works on the system level (flag set to true), but on the sage only level (flag set to false), it instead seems to register the actual letters of E-s-c-.....
* merged * |
#7
|
||||
|
||||
Quote:
__________________
-- Greg |
#8
|
|||
|
|||
Oh.
I asked here because I'm using your API utilities to do this, and so I considered that maybe there was a disconnect in your utilities and the actual Sage API. I thought using your utilities made it relevant. I'll find my answers elsewhere. |
#9
|
||||
|
||||
Sorry, I didn't mean to be short with you. If you have some reason to think the bare API function works but the wrapper is broken, then yes, that would be relevant. But my impression was that you hadn't managed to get even the bare function to work. Maybe I misunderstood that part.
If there's any doubt about whether the wrapper is at fault, try testing the bare function in Studio widget code or Expression Evaluator. I find this to be a much more efficient way of learning how an API works than multiple compile/debug cycles of trial-and-error in Java. Finally, this may be a dumb question, but why would you want to do Keystroke("Escape", false) when you can do SageCommand("Options") instead? Seems to me that using command names would be preferable in cases where the user may have remapped keystrokes.
__________________
-- Greg |
#10
|
|||
|
|||
Heh..your question is no dumber than mine. I'm just trying to implement what the users are asking for. I honestly don't use my interface at all, so I don't know enough to know what a good substitute would be.
I think what they want is just to be able to pass some basic interface actions through. They want to be able to navigate the Sage interface using their own interface. So, they can move down a menu sending the "Down" keypress repeatedly, then select is using the "Enter" keypress. It's crude, but it's oft requested. I'm still a complete newb to the Studio...though that's about to change. If I were more familiar with it, I probably would have thought to use the express. evaluator. I'll try that from now on first...and I did just try it, and it fails to work for me there, too....so I'm back to not knowing how the Keypress API call is supposed to work. |
#11
|
||||
|
||||
The best thing to do if you run into API calls that don't seem to function properly is to report it to SageTV. I sent in a question about this & was told it should now be fixed for the next update. Try it again when the next version is posted.
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#12
|
|||
|
|||
Quote:
I didn't want to bother Sage with this...I figured just about the LAST possibility was that the command was actually broken. I was sure I was just doing something dumb. How would I report this, in the future? With the bug submission form you have linked in your sig? |
#13
|
||||
|
||||
Quote:
Quote:
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#14
|
|||
|
|||
Ok, thanks. And by trying the next posted release...you mean the next version beyond 6.3.8?
|
#15
|
||||
|
||||
yes
|
#16
|
|||
|
|||
I just tried 6.3.10. It's better, because now when I pass "Escape", it doesn't open up the search text box. However, it also doesn't pass the Escape key in. It doesn't seem to do anything for me. If I pass "Down", nothing happens. I had expected that it would move the menu selection down.
Maybe I don't understand what the Keypress API call is supposed to do. Basically what I'm trying to do is allow them to navigate the menus in a generic fashion. |
#17
|
||||
|
||||
It still seems to me that the most generic way to navigate menus is by using SageCommand instead of KeyPress. That way you don't need to worry about which key invokes which command in which menu (e.g. Left means Back in the Recordings menu but not in the Program Guide); just use the command names directly.
KeyPress may be what your users are asking for, but that doesn't mean it's what that want. What they want is most likely something like SageCommand, i.e. a reliable, keyboard-independent way of navigating menus that the user can't screw up by remapping keys. They just don't know enough to ask for it by its proper name.
__________________
-- Greg |
#18
|
|||
|
|||
Well, lemme take a look at that, perhaps it would be overall better....but I know some of these guys will simply want to be able to move the lighted selection bar up and down and select things, as opposed to being taken directly to the screen they want. They're weird like that.
Is there an overview of everything that can be passed to SageCommand? It takes a string, and the API description doesn't list what strings are valid. I know "Home" and "Stop" are two of them, but that's it. |
#19
|
||||
|
||||
Quote:
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#20
|
||||
|
||||
Or see Chapter 5 of the manual. Basically any action you can take in the UI is covered by SageCommand. Sage handles keystroke input by looking up the keystroke mapping and passing the result to SageCommand, which does the actual work.
__________________
-- Greg |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SageTV V6.3 is now available for Win/Linux! | Narflex | Announcements | 1 | 03-07-2008 12:33 PM |
A "Void" API | Wirenut | SageTV Studio | 3 | 12-10-2007 11:45 AM |
SageTV V6.3.2 Beta is Available! | Narflex | SageTV Beta Test Software | 0 | 11-21-2007 07:08 PM |
SageTV V6.3.1 Beta is Available | Narflex | SageTV Beta Test Software | 1 | 11-09-2007 05:17 PM |
Having trouble handling what an api call returns... | beelzerob | SageTV Studio | 2 | 05-31-2006 07:45 PM |