KeyReleased Event

Hi everybody,
i have a JTable and what I want to is that when the user type something in the TextField the table will show the names of the company that start with the letter that the user typed. But the problem is that each time the user type the event executes 2 times, this is the code:
private void txt_searchCompanyKeyReleased(java.awt.event.KeyEvent evt) {
TableModel model = jt_Company.getModel();
ArrayList<String[]> dataArray = new ArrayList<String[]>();
String[] data = new String[ jt_Company.getRowCount() ];
String s = txt_searchCompany.getText();
System.out.println("Cantidad de filas: " + jt_Company.getRowCount()+ "\nCantidad de col: " + jt_Company.getColumnCount());
for(int i = 0; i < jt_Company.getRowCount(); i++)
   for(int j = 0; j < model.getColumnCount(); j++)
       if(model.getValueAt(i, 1).toString().startsWith(s) == true)
         data = model.getValueAt(i, j).toString();
         dataArray.add(data);
          System.out.println(" " + data[0] + "Tamano de ArrayList: " + data.  length);
jt_Company.setModel(new Business.CompanyTable(dataArray));
}//End of the methodthe method compares very well the string and the name of the companies in each row, but as mention before the method does it 2 times that means that the string array will the double of rows.
How can I do to make the event execute only one time
Thanks a lot.......

Hi camickr, i tried what you said and It works well, but now i am traying to do another thing.
Look, i want that the textfield remove the last character when the user type one of this character: ( ' / * % ? = > < etc...)and this is the code:
class MyDocumentListener implements DocumentListener {
    /** Creates a new instance of MyDocumentListener */
    public MyDocumentListener() {
    public void insertUpdate(DocumentEvent e) {
      updateLog(e);
    public void removeUpdate(DocumentEvent e) {
      updateLog(e);
    public void changedUpdate(DocumentEvent e) {
    //Plain text components don't fire these events.
    public void updateLog(DocumentEvent e) {
       int i = e.getDocument().getLength();
       String name = " ";
       try{
            name = e.getDocument().getText(i-1, 1);
            if(restriction.restrictionSearchBy(name) == true)
               JOptionPane.showMessageDialog(null, "Hola" + name);
               txt_searchCompany.getDocument().remove(i-1, 1);
               e.getDocument().remove(i-1, 1);// I tried this and did not work also
            else{
       catch(javax.swing.text.BadLocationException b){}
}but i got this exception when i run it:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Attempt to mutate in notification
at javax.swing.text.AbstractDocument.writeLock(AbstractDocument.java:1343)
at javax.swing.text.AbstractDocument.remove(AbstractDocument.java:569)
at Client.MDIFrame$MyDocumentListener.updateLog(MDIFrame.java:867)
at Client.MDIFrame$MyDocumentListener.insertUpdate(MDIFrame.java:847)
at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:184)
at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:754)
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:711)
at javax.swing.text.PlainDocument.insertString(PlainDocument.java:114)
at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:673)
at javax.swing.text.JTextComponent.replaceSelection(JTextComponent.java:1099)
at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(DefaultEditorKit.java:839)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1571)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2763)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2798)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2726)
at java.awt.Component.processEvent(Component.java:5265)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
at java.awt.Component.dispatchEventImpl(Component.java:3841)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
what can i do the remove it.
Thanks a lot....

Similar Messages

  • [SOLVED] Keyboard issue - fn+key "KeyRelease" event not triggered

    Hi Archers :)
    First post, sorry if not in the right section.
    I have a quite anoying bug. I bought a no name laptop, imported by Textorm, model M116 SU7300, same model as this one (http://www.textorm.com/pc-portable/pc-p … 22%5D.html)
    On the keyboard, the '<' and '>' symbols are mapped on "fn+W" and "fn+MAJ+W".
    Everything works fine in a TTY console. All others fn-KEY are working well.
    The problem is with a Xorg environment : when pressing fn+W or fn+MAJ+W, it seems that the release key is never triggered, acting like if I was pressing the key in continue.
    When pressing another key, the crazy '<' input stop, but then, fn+W won't works again... until I trigger a press/release event with 'acpi_fakekey 86'.
    Then, same scenario.
    I booted a live Archbang,  same result (well, I wasn't very surprised), and a live Sabayon... same result.
    Using xev, I can see that when pressing/releasing fn+W, the KeyReleased event is never triggered. I can provide a log if needed.
    So it seems related to the Xorg driver....
    I tryied to use the kbd driver by adding an xorg.conf
    Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "kbd"
    Option "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "fr" # "fr-oss" pour Feisty et +
    Option "XkbVariant" "latin9"
    EndSection
    Section "ServerFlags"
    Option "AutoAddDevices" "Off"
    EndSection
    I can confirm that the kbd driver was in use with Xorg log :
    [ 900.371] (II) LoadModule: "kbd"
    [ 900.371] (II) Loading /usr/lib/xorg/modules/input/kbd_drv.so
    [ 900.371] (II) Module kbd: vendor="X.Org Foundation"
    [ 900.371] compiled for 1.14.0, module version = 1.7.0
    [ 900.371] Module class: X.Org XInput Driver
    [ 900.371] ABI class: X.Org XInput driver, version 19.1
    [ 900.780] (II) Using input driver 'kbd' for 'Generic Keyboard'
    [ 900.780] (**) Option "CoreKeyboard" "on"
    [ 900.780] (**) Generic Keyboard: always reports core events
    [ 900.780] (**) Generic Keyboard: always reports core events
    [ 900.780] (**) Option "Protocol" "standard"
    [ 900.780] (**) Option "XkbRules" "xorg"
    [ 900.780] (**) Option "XkbModel" "pc105"
    [ 900.780] (**) Option "XkbLayout" "fr"
    [ 900.780] (**) Option "XkbVariant" "latin9"
    [ 900.780] (II) XINPUT: Adding extended input device "Generic Keyboard" (type: KEYBOARD, id 6)
    ... no luck. Same comportement.
    I tryed the xorg-input-evdev git version, no luck. (But if I understand, xorg-input-evdev use kbd as underlying driver?)
    I also tryed xorg-server-dev 1.14.99.1-1
    So for now, I use a ugly hack : I mapped "W-W" and "S-W-W" in my openbox rc.xml to execute "acpi_fakekey 86". Nearly working all the time.
    I know this isn't directly related to Arch, but if someone has any pointers... I take any ideas.
    Thanks in advance!
    PS :
    xorg-server 1.14.1-1
    xf86-input-evdev 2.8.0-1
    Last edited by jc.saaddupuy (2013-05-28 18:28:05)

    Wow thanks!
    I confirm that this is working.
    Thanks to your infos, I investigate the udev stuff.
    You will have to know the vendor and product name of your machine :
    cat /sys/class/dmi/id/{sys_vendor,product_name}
    Thats the strings your udev rule have to match in ENV{DMI_VENDOR} and ATTR{[dmi/id]product_name}.
    For me, both was empty, so I use a wildcard :
    ENV{DMI_VENDOR}=="*", ATTR{[dmi/id]product_name}=="*"
    Then, you'll have to specify which codes needs to trigger a key release (sames as found with keymap -i)
    Add a file in /usr/lib/udev/keymaps/force-release/  whith the hex values (one per line)
    I named mine 'textorm'
    /echo 0x56 > /usr/lib/udev/keymaps/force-release/textorm
    And add it in the RUN of your udev rule (not the full file name):
    ENV{DMI_VENDOR}=="*", ATTR{[dmi/id]product_name}=="*", RUN+="keyboard-force-release.sh $devpath textorm"
    Knowing your serio ( /sys/bus/serio/devices/serio0), you can test the keyboard-force-release.sh script (the serio parameter HAVE TO NOT begin with /sys/)
    /usr/lib/udev/keyboard-force-release.sh bus/serio/devices/serio0 textorm
    You can then check the /sys/bus/serio/devices/serio0/force_release content.
    Works like a charm :)

  • ValueChanged- and keyReleased-Events in JTree

    Hello,
    Suppose I have Items in a JTree. Any time the selected item changes, heavy work has to be done to get the details of the node and present it to the user.
    Suppose further the user uses the arrow-keys to scroll through the list an he holds down the key. I do get many calls to my Listeners valueChanged(TreeSelectionEvent event), but I am interested just in the last event, in order to avoid all the heavy work. How can this be done?
    I tried the following, but I do get a keyReleased-Event at any new selection. (Maybe because a nested component of the JTree feels like I had released the arrow-key. Is this a bug?):
    private class NodeSelectionEventHandler implements KeyListener, TreeSelectionListener {
    private boolean forwardEvents = true;
    private EventObject lastEvent;
    public void keyTyped(KeyEvent e) {
    public void keyPressed(KeyEvent e) {
    forwardEvents = false;
    public void keyReleased(KeyEvent e) {
    //System.out.println(e.getComponent());
    // Leider bekomme ich nach jeder auswahl mit Cursortaste auch einen
    // keyReleased-Event, obwohl die Taste immer noch gedrueckt ist.
    forwardEvents = true;
    if (lastEvent != null) {
    lastEvent = null;
    fireNodeSelectionChanged();
    //System.out.println("Last Selection forwarded");
    public void valueChanged(TreeSelectionEvent event) {
    // there is no event.getValueIsAdjusting() in JDK1.3
    handelEvent(event);
    private void handelEvent(EventObject event) {
    //Thread.dumpStack();
    if (forwardEvents) {
    lastEvent = null;
    fireNodeSelectionChanged();
    //System.out.println("Selection forwarded");
    else {
    lastEvent = event;
    //System.out.println("Selection eaten");

    I have a JTree from which I generate classes on selection.
    To ensure only one event is fired I install two listeners.
    I install a mouse listener and capture an event when the mouse is clicked, and I install a key listener and only catch the enter key being pressed as follows:
    tree.addMouseListener(new java.awt.event.MouseAdapter() {
              public void mouseClicked(MouseEvent e) {
              showFunction();
    tree.addKeyListener(new java.awt.event.KeyAdapter() {
    public void keyReleased(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_ENTER) {
    showFunction();
    This means something happens only if a user clicks on the node with the mouse or selects the node and presses the enter button. I have used this as a general standard throughout my application and it works on all platforms.
    Hope this helps

  • Suspend a keyReleased event

    How i can suspend a keyReleased event?
    I try with:
    public void keyReleased (KeyEvent e) {
          while(myCondition) { // nothing. code of the my main Thread puts slowww }
           // process the keyReleased event
    }When exit of the while the speed are normal.
    ...

    Sorry, read:
    "I need to suspend keyPressed until JUMP finish, then keyReleased continue, next sentence clear the HashMap entry."
    instead of:
    "I need to suspend keyPressed until JUMP finish, then keyPressed continue, next sentence clear the HashMap entry."
    Any suggested idea is to use:
    public class keyboard extends KeyListener {
             private Frame frame; // where main Thread is locale
             private HashMap keymap  = new HasMap();
             public keyboard(Frame frame) {
                    this.frame=frame;
                    frame.addKeyListener(this);
             public void keyReleased() {
                       if(frame.JUMP) return;
                      // code                
              public void clearHashMap() {
                   // clear HashMap
    public class frame() {
              // call it 40 FPS
              public void doAnim {
                   // complex code to post it
                   When jump has finish keyboard.clearHashMap();
    }Once JUMP has finish clear ALL the HashMap.

  • "real" keyreleased events?

    I have searched high and low for this answer.
    Does anyone know how to catch "real" key pressed or key released events?
    I am trying to write an app, that has a fastforward and rewind action. I need to know how long they have held down the button.
    Java for some reason, enlighten me please, sends the key press and key released any type a key is pressed...the names are quite misleading to me.
    I have tried many different things and nothing i have tried works. I am so close to finishing the alpha stage of my app, and i ran into this wall.
    Greatly appreciated for an answer,
    shane

    Either i am just not getting it again....or something else here is the code i wrote.
    import java.awt.event.*;
    import javax.swing.*;
    public class Test extends JFrame {
        JEditorPane editMain = new JEditorPane();
        long l=0;
        public Test() throws Exception{
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JButton b=new JButton("Test");
            this.getContentPane().add(b);
            b.addKeyListener(new KeyAdapter() {
                  public void keyTyped(KeyEvent e) {
                  public void keyPressed(KeyEvent e) {
                      if (l==0) {
                          l = System.currentTimeMillis();
                        System.out.println("key pressed");
                      e.consume();
                  public void keyReleased(KeyEvent e) {
                      l=System.currentTimeMillis()-l;
                      System.out.println("press time released="+l);
                      l=0;
                      e.consume();
        public static void main(String args[]) throws Exception {
            Test gI = new Test();
            gI.setSize(420, 380);
            gI.setLocationRelativeTo(null);
            gI.setVisible(true);
    }There is the code above i wrote. Now this still does not work becuase there is no way to tell when it was released. Here is the output from me holding down one key for a couple of like two seconds, and then released.
    Maybe yall can see what i talking about now. Here
    key pressed
    press time released=500
    key pressed
    press time released=34
    key pressed
    press time released=34
    key pressed
    press time released=34
    key pressed
    press time released=34
    key pressed
    press time released=34
    key pressed
    press time released=34
    key pressed
    press time released=33
    key pressed
    press time released=34
    key pressed
    press time released=32
    key pressed
    press time released=28
    key pressed
    press time released=30
    key pressed
    press time released=34
    key pressed
    press time released=34
    key pressed
    press time released=33
    key pressed
    press time released=34
    key pressed
    press time released=33
    key pressed
    press time released=34
    key pressed
    press time released=34
    key pressed
    press time released=29
    key pressed
    press time released=29
    key pressed
    press time released=34
    key pressed
    press time released=34
    key pressed
    press time released=24
    Process Test finishedAm I wrong here, but wouldnt you expect just 2 println's here.
    Even if i put some delay on this, or try to consume. I think this is a linux/java problem. But i am kinda obsessed now, I want to know a work around.

  • KeyReleased event problems

    Hi everybody,
    i have a JTable and what I want to is that when the user type something in the TextField the table will show the names of the company that start with the letter that the user typed. But the problem is that each time the user type the event executes 2 times, this is the code:
    private void txt_searchCompanyKeyReleased(java.awt.event.KeyEvent evt) {
    TableModel model = jt_Company.getModel();
    ArrayList<String[]> dataArray = new ArrayList<String[]>();
    String[] data = new String[ jt_Company.getRowCount() ];
    String s = txt_searchCompany.getText();
    System.out.println("Cantidad de filas: " + jt_Company.getRowCount()+ "\nCantidad de col: " + jt_Company.getColumnCount());
    for(int i = 0; i < jt_Company.getRowCount(); i++)
       for(int j = 0; j < model.getColumnCount(); j++)
           if(model.getValueAt(i, 1).toString().startsWith(s) == true)
             data = model.getValueAt(i, j).toString();
             dataArray.add(data);
              System.out.println(" " + data[0] + "Tamano de ArrayList: " + data.  length);
    jt_Company.setModel(new Business.CompanyTable(dataArray));
    }//End of the method
    the method compares very well the string and the name of the companies in each row, but as mention before the method do it 2 times that means that the string array will the double of rows.
    How can I do to make the event execute only one time
    Thanks a lot.......

    Hi,
    KeyListener is not probably a good idea for you. You should use DocumentListener. for Example:
    jTextFieldIP.getDocument().addDocumentListener(new DocumentListener()
       public void changeUpdate(DocumentEvent e){}
       public void insertUpdate(DocumentEvent e)
           try
               jListCode.setSelectedIndex(Integer.parseInt(jTextFieldIP.getText()));
            catch(NumberFormatException ne)
                JOptionPane.showMessageDialog(null, "Only numbers in this field please.");
       public void removeUpdate(DocumentEvent e)
           insertUpdate(e);
    } );

  • Listening key events

    Hello there,
    I am trying to get the information of the key pressed on the keyboard. Following code works only for characters not for the arrow keys, alt, shift, F1 and etc...
    Can you tell me what should I do?
    Thanks.
    Berk Can Celebisoy
    class MyKeyEvents implements KeyListener
    public void keyTyped(KeyEvent e) {
    System.out.println(e.getKeyChar());
    public void keyReleased(KeyEvent e) {
    public void keyPressed(KeyEvent e) {
    }

    The KeyTyped event is only generated for displayable characters. KeyPressed/KeyReleased events are generated for all key strokes.
    Read the KeyEvent API for more information.

  • Trouble with keyboad events and thead

    hi ,
    i am havin a poblem with keyboad events and thead.
    i have used t.start() in the keyreleased event but the thread runs only for 1st keyreleased event then when i again release any key it gives me a run time error as follows.
    Exception in thread "AWT-EventQueue-0" java.lang.IllegalThreadStateException
    at java.lang.Thread.start(Unknown Source)
    at snake.key(snake.java:67)
    at snake.keyReleased(snake.java:34)
    at java.awt.Component.processKeyEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Window.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Sour
    ce)
    please help me out .

    You might want to reschedule a timer task instead of trying to start a thread again. Or you could modify your thread class in a way that you
    - check whether it's already running
    - if so, stop it
    - initialize the countdown or whatever you do
    - start it

  • JComboBox Event Handling

    Editable JComboBox (combo1.setEditable(true)) is not adhering to KeyEvents such as keyTyped() and keyReleased() events.
    How can I make a "Editable" JComboBox to adhere KeyEvents.

    a comboBox is made up of many components.
    when editable there is a JTextField
    you need to get the textfield to add the keylistener
    combo.getEditor().getEditorComponent().addKeyListener(new KeyAdapter()
    other times you may need to cast it
    ((JTextField)combo.getEditor().getEditorComponent()).someMethod()

  • KeyTyped Event: funny behaviour

    This should be a very simple question... but I am stuck with it.
    I want to implement the usual feature of enabling a button only if a text field is not empty. I suppose you all have seen this before.
    I am catching the KeyTyped event and in the event handler I am checking for the length of the text. This is the code inside the handler:
    String txt=myTextField.getText();
    myButton.setEnabled(txt.length()>0);
    So yes, it works, but with a funny behaviour: the button is enabled only after the second keystroke, that is, when the length of the text is >=2 and not >0. A quick explanation is that my event handler is being called before the event handler of the textfield itself so at that moment the text is still empty. But when pressing the "backspace" key... it works fine, so the theory is wrong!!
    My workaround is to catch the KeyReleased event... but visual effect is not so satisfactory, and anyway, why is this happening?
    And what is the "official" way of implementing this trick?
    Thanks in advance,
    Luis.
    (P.S.: I am using a JTextField and a JButton, and have tested this with JDK 1.2 and 1.4 with the same results.)

    You'd want to do something like this:
    JTextField watchedField = new JTextField();
    // construct the action
    FieldWatcherAction watcher = new FieldWatcherAction( watchedField );
    // make a button with the action
    JButton b = new JButton( watcher );
    // add a button to a toolbar with the action
    jtoolBar.add( watcher );
    // etc...
    class FieldWatcherAction extends AbstractAction implements DocumentListener
      JTextField  field;
      public FieldWatcherAction( JTextField f )
        super( "", someIcon );
        setEnabled( false );
        field = f;
        field.getDocument().addDocumentListener( this );
      protected void updateState()
        setEnabled( field.getDocument().getLength() > 0 );
      public void insertUpdate( DocumentEvent evt )
        updateState();
      public void removeUpdate( DocumentEvent evt )
        updateState().;
      public void changedUpdate( DocumentEvent evt )
        updateState();
    }The action would need to be fleshed out more, obviously. You'd probably want to add text for a label ( empty string in super call in constructor ), define the icon ( second arg in super call ). You can also set tooltip text and other things. All of this can be changed by editing various properties of the action. Relevant constants would be:
    javax.swing.Action.ACCELERATOR_KEY  // key accelerator for JMenuItems
    javax.swing.Action.MNEMONIC_KEY // mnemonic key for JMenuItems
    javax.swing.Action.NAME // JButton text or JMenuItem text
    javax.swing.Action.SHORT_DESCRIPTION // Tooltip text
    javax.swing.Action.SMALL_ICON // image icon for JButton, JMenuItem and JToolBar buttons.

  • [SOLVED][Toshiba Laptop] Volume Wheel never stops generating events

    I have this volume wheel on my laptop which I like to use to control the volume of the audio on my laptop. However I run into a problem:
    The Good  => Using xev I verified that It does generate keypress and keyrelease events (two different ones for either up or down). I would still have to remap those to XF86VolumeLower and such...
    The Bad => Once I turn the wheel  I keep getting keypress/keyrelease events continously even after I've stopped turning it...
    The Ugly = > this makes it completely not usable.
    Anyone seen this problem before? I googled around, most people seemed to have a problem getting events from volume wheels...
    Edit:
    Sorry for editing such an old post. This got fixed in udev-159-1.
    Last edited by GogglesGuy (2010-07-07 17:55:30)

    I'm still having this issue running the latest kernel and xorg. Since the event seems to be reported by xorg, would this most likely be a xorg bug or misconfiguration (and such should I report it as a bug to xorg)?

  • [SOLVED] PgUp/PgDown Improperly Spawn Two Keyboard Events

    After doing an upgrade (pacman -Syu), I can no longer use the following keys on my keyboard without unappreciated consequences:
    - PgUp
    - PgDown
    - now, apparently, the Left arrow
    When I use xev, I get two separate events for every one real keyboard event, with two keycodes.
    For example, this is what happens when I press PgUp:
    KeyPress event, serial 24, synthetic NO, window 0x1800001,
    root 0xae, subw 0x0, time 1850204, (679,556), root:(680,571),
    state 0x0, keycode 112 (keysym 0xffaf, KP_Divide), same_screen YES,
    XLookupString gives 1 bytes: (2f) "/"
    XmbLookupString gives 1 bytes: (2f) "/"
    XFilterEvent returns: False
    KeyPress event, serial 24, synthetic NO, window 0x1800001,
    root 0xae, subw 0x0, time 1850204, (679,556), root:(680,571),
    state 0x0, keycode 99 (keysym 0xff55, Prior), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False
    MappingNotify event, serial 27, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248
    KeyRelease event, serial 27, synthetic NO, window 0x1800001,
    root 0xae, subw 0x0, time 1850306, (679,556), root:(680,571),
    state 0x0, keycode 112 (keysym 0xffaf, KP_Divide), same_screen YES,
    XLookupString gives 1 bytes: (2f) "/"
    XFilterEvent returns: False
    MappingNotify event, serial 27, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248
    KeyRelease event, serial 27, synthetic NO, window 0x1800001,
    root 0xae, subw 0x0, time 1850306, (679,556), root:(680,571),
    state 0x0, keycode 99 (keysym 0xff55, Prior), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    I've checked xmodmap -pke, but I have no idea what it means:
    keycode 99 = Prior NoSymbol Prior
    keycode 112 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab
    Any help would be appreciated. Needless to say, this is pretty annoying when I'm trying to edit code and it searches my document instead of scrolling up, or capitalizes words (some vim feature I had previously never known about, and will most likely never use).
    Last edited by secretrobotron (2010-06-24 15:09:05)

    I'm pretty sure I'm using the latest xorg. I installed a fresh version of arch a couple months ago.
    My xorg.conf has about six lines concerning keyboards, most of which are
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "keyboard"
    Option "XkbLayout" "us"
    EndSection
    and the other being
    InputDevice "Keyboard0"
    in the ServerLayout section.
    Is there a newer way to do this? Perhaps omitting it altogether?
    I'm using xmonad, and I checked my keybindings in xmonad.hs to see if I had anything hilarious. Alas, I found nothing.

  • Why wont my paddle work anymore in my flash catching game?

    Hey guys im making a flash game for a uni project and i had it all working great! I then proceeded to move my code and content onto the second frame to add menus and such to the game and i updated all the code so it should work on the second frame and the game still works great apart from my paddle no long moving and i cant figure out at all what ive done.
    this is the code for the actual game part of it. sorry for the clutter of it but im not good with code!
    could anyone tell me what i need to do to get my paddle moving again!
    //code!
    import flash.utils.Timer;
    import flash.events.KeyboardEvent;
    import flash.events.MouseEvent
    var keyArray : Array = new Array(false,false);//An array to check if keys are pressed
    var ballSpeed : int = 5;//the speed of falling lemmings
    var moveSpeed : int = 7;//the speed the player can move their boat at
    boat.x = stage.stageWidth/2;//move the boat to the centre of the stage at the start of the game
    var lives : int = 5;//the amount of lives the player will have
    var score : int = 0;//the starting score a player has
    var minSpawnTime : int = 1500;//the time it takes the lemmings to spawn
    var maxSpawnTime : int = 3250;//maximum time before next lemming is spawned
    var spawnTimer:Timer = new Timer(2000,1); //2 seconds and loops
    lives_txt.text = "Lives Left: " + lives;//text box reads lives left
    score_txt.text = "Score: " + score;//text box reads score
    stop();
    stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);//event listener to tell flash to call "key pressed"
    stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased);//event listener to tell flash to call "key released"
    stage.addEventListener(Event.ENTER_FRAME, update);//event listener to tell flash to call "update" for new frames
    startGame();//tells flash to call the startGame function
    function startGame():void//a new function called startGame
        spawnTimer.addEventListener(TimerEvent.TIMER, spawnBall);//new event listener to listen for the timer to run out and spawn new lemming
        spawnTimer.start();//starts the clock on the timer
    function keyPressed(event:KeyboardEvent) : void//a new function called keyPressed for when player uses arrow keys
        if(event.keyCode == 39)//if the keyboard event is the right key
            trace("right");//prints right in output window
            keyArray[0] = true;//right key array is true
        if(event.keyCode == 37)//if the keyboard event is the left key
            trace("left");//prints left in output window
            keyArray[1] = true;//left key array is true
    function keyReleased(event:KeyboardEvent) : void//a new function called keyReleased for when arrow keys are released
        if(event.keyCode == 39 )//if the keyboard event is the right key
            keyArray[0] = false;//right key array false
        if(event.keyCode == 37)//if the keyboard event is the left key
            keyArray[1] = false;//left key array false
    function update(event:Event) : void//a new function called update for updating the x position of the boat
        if(keyArray[0] == true)//if the keyArray for left is true
            boat.x += moveSpeed;//move the x position of the boat right with the designated move speed
        if(keyArray[1] == true)//if the keyArray for right is true
            boat.x -= moveSpeed;//move the x position of the boat left with the designated move speed
    function spawnBall(event:TimerEvent): void//a new function called spawnBall
        trace("SPAWN");//prints SPAWN in the output
        var ball : Ball = new Ball();//declares a new "temporary variable called "ball" that stores object of Type:Ball and populates it with a new object Ball
        stage.addChild(ball);//adds this new ball onto the stage
        ball.y = 0;//set the ball's vertical position to fall from
        ball.x = ball.width + (Math.random() * (stage.stageWidth - (2*ball.width)));    //sets the ball to have a random position on the x axsis so they seem to fall randomly
        ball.addEventListener(Event.ENTER_FRAME, moveBall);    //new event listener for the ball to listen for a new frame and to call the "moveBall" function
        spawnTimer.reset(); //resets the spawnTimer so it can be re-started
        spawnTimer.delay = minSpawnTime + (Math.random() * (maxSpawnTime - minSpawnTime) ); //set the delay for the next time to be somewhere between the minSpawnTime (1.5 seconds) and maxSpawnTime (3.25 seconds)
        spawnTimer.start();//tell the spawnTimer to start again
        if((maxSpawnTime - 20) >= minSpawnTime) //if the maximum time between spawn times is too close to the minimum time between spawns
            maxSpawnTime -= 20;//drop the minimum time between spawns by 20
    function moveBall(event:Event):void //new function called "moveBall" takes up 1 argument "event"
        event.currentTarget.y += ballSpeed; //move the object this functions event listener by the speed set.
            if(event.currentTarget.hitTestObject(sea)) //if the lemming falls and hits the sea object
            if(this.currentFrame == 2)//and we are still on frame 2
                lives--;//take 1 life away from player
                if(lives > -1)//if the player still have lifes
                    //set the text box to display the amount of lives remaining
                    lives_txt.text = "Lives Left: " + lives;
            if(lives < 0)//if the player has less than no lives game is over
                stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);//take away event listeners for key presses and releases
                stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyReleased);
                stage.removeEventListener(Event.ENTER_FRAME, update);//remove the update event listeners
                spawnTimer.stop();//stop the timer
                gotoAndStop(3);//tell flash to go to and stop on the loser screen
            event.currentTarget.parent.removeChild(event.currentTarget);//remove the falling objects from the game
            event.currentTarget.removeEventListener(Event.ENTER_FRAME, moveBall);//remove eventlistener for when game is over updating falling objects
        else
            if(this.currentFrame == 2)//if the player is still in game
                if(event.currentTarget.hitTestObject(boat))//if eventListener is attached to hits the game object called "boat"
                    score++;//add 1 to the players score
                    score_txt.text = "Score: " + score;//update the score text to read the players score
                    event.currentTarget.parent.removeChild(event.currentTarget);//remove remove the lemming after it has hit boat
                    event.currentTarget.removeEventListener(Event.ENTER_FRAME, moveBall);//remove the eventlistener after caught so it doesnt keep updating
                if(score > 24)//if the player has more than 24 points
                    stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);//take away event listeners for key presses and releases
                    stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyReleased);
                    stage.removeEventListener(Event.ENTER_FRAME, update);//remove the update event listeners
                    spawnTimer.stop();//stop the timer
                    gotoAndStop(4);//tell flash to go to and stop on the 3rd frame of the time line i.e. the Game Over screen

    tried commenting them out doesnt effect it either...
    this is what the code now looks like with everything that should remove the key presses commented out
    import flash.utils.Timer;
    import flash.events.KeyboardEvent;
    import flash.events.MouseEvent
    var keyArray : Array = new Array(false,false);//An array to check if keys are pressed
    var ballSpeed : int = 5;//the speed of falling lemmings
    var moveSpeed : int = 7;//the speed the player can move their boat at
    boat.x = stage.stageWidth/2;//move the boat to the centre of the stage at the start of the game
    var lives : int = 5;//the amount of lives the player will have
    var score : int = 0;//the starting score a player has
    var minSpawnTime : int = 1500;//the time it takes the lemmings to spawn
    var maxSpawnTime : int = 3250;//maximum time before next lemming is spawned
    var spawnTimer:Timer = new Timer(2000,1); //2 seconds and loops
    lives_txt.text = "Lives Left: " + lives;//text box reads lives left
    score_txt.text = "Score: " + score;//text box reads score
    stop();
    stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);//event listener to tell flash to call "key pressed"
    stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased);//event listener to tell flash to call "key released"
    trace(this);  // if you fail to see this trace the playhead is not entering this frame and is executing none of this code.
    stage.addEventListener(Event.ENTER_FRAME, update);//event listener to tell flash to call "update" for new frames
    startGame();//tells flash to call the startGame function
    function startGame():void//a new function called startGame
        spawnTimer.addEventListener(TimerEvent.TIMER, spawnBall);//new event listener to listen for the timer to run out and spawn new lemming
        spawnTimer.start();//starts the clock on the timer
    function keyPressed(event:KeyboardEvent) : void//a new function called keyPressed for when player uses arrow keys
    trace("keyPressed",event.keyCode);
        if(event.keyCode == 39)//if the keyboard event is the right key
            trace("right");//prints right in output window
            keyArray[0] = true;//right key array is true
        if(event.keyCode == 37)//if the keyboard event is the left key
            trace("left");//prints left in output window
            keyArray[1] = true;//left key array is true
    function keyReleased(event:KeyboardEvent) : void//a new function called keyReleased for when arrow keys are released
        if(event.keyCode == 39 )//if the keyboard event is the right key
            keyArray[0] = false;//right key array false
        if(event.keyCode == 37)//if the keyboard event is the left key
            keyArray[1] = false;//left key array false
    function update(event:Event) : void//a new function called update for updating the x position of the boat
    trace(keyArray[0],keyArray[1]);
        if(keyArray[0] == true)//if the keyArray for left is true
            boat.x += moveSpeed;//move the x position of the boat right with the designated move speed
        if(keyArray[1] == true)//if the keyArray for right is true
            boat.x -= moveSpeed;//move the x position of the boat left with the designated move speed
    function spawnBall(event:TimerEvent): void//a new function called spawnBall
        trace("SPAWN");//prints SPAWN in the output
        var ball : Ball = new Ball();//declares a new "temporary variable called "ball" that stores object of Type:Ball and populates it with a new object Ball
        stage.addChild(ball);//adds this new ball onto the stage
        ball.y = 0;//set the ball's vertical position to fall from
        ball.x = ball.width + (Math.random() * (stage.stageWidth - (2*ball.width)));    //sets the ball to have a random position on the x axsis so they seem to fall randomly
        ball.addEventListener(Event.ENTER_FRAME, moveBall);    //new event listener for the ball to listen for a new frame and to call the "moveBall" function
        spawnTimer.reset(); //resets the spawnTimer so it can be re-started
        spawnTimer.delay = minSpawnTime + (Math.random() * (maxSpawnTime - minSpawnTime) ); //set the delay for the next time to be somewhere between the minSpawnTime (1.5 seconds) and maxSpawnTime (3.25 seconds)
        spawnTimer.start();//tell the spawnTimer to start again
        if((maxSpawnTime - 20) >= minSpawnTime) //if the maximum time between spawn times is too close to the minimum time between spawns
            maxSpawnTime -= 20;//drop the minimum time between spawns by 20
    function moveBall(event:Event):void //new function called "moveBall" takes up 1 argument "event"
        event.currentTarget.y += ballSpeed; //move the object this functions event listener by the speed set.
            if(event.currentTarget.hitTestObject(sea)) //if the lemming falls and hits the sea object
            if(this.currentFrame == 2)//and we are still on frame 2
                lives--;//take 1 life away from player
                if(lives > -1)//if the player still have lifes
                    //set the text box to display the amount of lives remaining
                    lives_txt.text = "Lives Left: " + lives;
            if(lives < 0)//if the player has less than no lives game is over
                //stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);//take away event listeners for key presses and releases
                //stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyReleased);
                stage.removeEventListener(Event.ENTER_FRAME, update);//remove the update event listeners
                spawnTimer.stop();//stop the timer
                gotoAndStop(3);//tell flash to go to and stop on the loser screen
            event.currentTarget.parent.removeChild(event.currentTarget);//remove the falling objects from the game
            event.currentTarget.removeEventListener(Event.ENTER_FRAME, moveBall);//remove eventlistener for when game is over updating falling objects
        else
            if(this.currentFrame == 2)//if the player is still in game
                if(event.currentTarget.hitTestObject(boat))//if eventListener is attached to hits the game object called "boat"
                    score++;//add 1 to the players score
                    score_txt.text = "Score: " + score;//update the score text to read the players score
                    event.currentTarget.parent.removeChild(event.currentTarget);//remove remove the lemming after it has hit boat
                    event.currentTarget.removeEventListener(Event.ENTER_FRAME, moveBall);//remove the eventlistener after caught so it doesnt keep updating
                if(score > 24)//if the player has more than 24 points
                    //stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);//take away event listeners for key presses and releases
                    //stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyReleased);
                    stage.removeEventListener(Event.ENTER_FRAME, update);//remove the update event listeners
                    spawnTimer.stop();//stop the timer
                    gotoAndStop(4);//tell flash to go to and stop on the 3rd frame of the time line i.e. the Game Over screen

  • Ctrl+tab is not working in editing mode

    I have JcheckBox and JTable in my JPanel. When user clicks or presses F2 to edit any cell value of the JTable a comboBox will appear with possible values. (This comboBox is coming from table CellEditor). When user presses ctrl+tab from the table focus should transfer to JComboBox all time. It is working only when the user presses ctrl+tab from the table cell which is not in editing mode. If the user presses ctrl+tab from the table cell which is in editing mode (i.e. focus is on the ComboBox of the cellEditor) it does not work. Please help me to find the solution.
    I give a sample code here for your reference.
    public class Frame1 extends JFrame {
    public Frame1()
    super();
    this.setLayout( null );
    this.setSize( new Dimension(400, 300) );
    JTextField ch = new JTextField();
    ch.setVisible(true);
    ch.setBounds(10, 10, 10, 10);
    this.add(ch, null);
    DefaultTableModel tmodel = new DefaultTableModel(3, 1);
    tmodel.setValueAt("0 0 1",0,0);
    tmodel.setValueAt("1 0 1",1,0);
    tmodel.setValueAt("2 0 1",2,0);
    JTable custLayersTable = new JTable(tmodel);
    custLayersTable.getColumnModel().getColumn(0).
    setCellEditor(new ComboEditor());
    custLayersTable.setBounds(new Rectangle(40, 40, 280, 145));
    custLayersTable.setSurrendersFocusOnKeystroke(true);
    this.add(custLayersTable, null);
    public static void main(String[] args)
    Frame1 a = new Frame1();
    a.setVisible(true);
    final class ComboEditor extends AbstractCellEditor
    implements TableCellEditor
    public Component getTableCellEditorComponent(JTable table,
    Object value,
    boolean isSelected,
    int row,
    int column)
    Vector<String> layerValSet = new Vector<String>();
    for(int i=0; i<3; i++)
    layerValSet.add(row+" "+column+" "+i);
    mComboModel = new DefaultComboBoxModel(layerValSet);
    mComboModel.setSelectedItem(value);
    mEditorComp = new JComboBox(mComboModel);
    return mEditorComp;
    public Object getCellEditorValue()
    return mEditorComp.getSelectedItem();
    private DefaultComboBoxModel mComboModel;
    private JComboBox mEditorComp;
    }

    Thanks a lot for your reply.
    Since the textField is in a different class i could not use the transferFocus API directly. I tried the following code in the keyreleased event of Combo Box but it was not working.
    KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent(
    e.getComponent().getParent());
    I also tried the following code in stopCellEditing and is not working.
    KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent();
    Is there any other way to achieve this?

  • Multimedia Keys in Awesome Window Manager [SOLVED]

    Hey,
    I've googled, searched, grepped and scanned about this for weeks, and I think I can't get it working on my own, although I'm sure the right answer is just out there waiting to be found, and one of you brighter minds might just know it already. Right, here's what happens.
    I was using openbox, and the keybindings were working just fine. This should probably discard missing symbols or scancodes for the keys, IMHO. Then I switch over to Awesome, and fall in love. The awesome (pun intended) config files by anrxc made it even better, and these days I can't live without my awesome. But I also wanted my volume keys to work. Not like I mind opening a terminal and popping alsamixer... I got 15 of them open all the time anyway. But I still wanted to use the fancy buttons.
    The strange thing is, the keys seem to "disappear" as soon as I map them somewhere. I've tried binding them in rc.lua:
    awful.key({}, "#121", function () exec("pvol.py -m", false) end),
    awful.key({}, "#122", function () exec("pvol.py -c -2", false) end),
    awful.key({}, "#123", function () exec("pvol.py -c 2", false) end),
    pvol.py is a script (made by anrxc too) that does stuff to the volume and displays a cute gtk progress bar to indicate current volume level. Invoking it from the terminal works fine.
    I also tried using xbindkeys:
    "pvol.py -m"
    XF86AudioMute
    "pvol.py -c -2"
    XF86AudioLowerVolume
    "pvol.py -c 2"
    XF86AudioRaiseVolume
    But the result was the same. Here's the output of xev with the keys unbound:
    KeyPress event, serial 25, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4706773, (74,267), root:(796,288),
    state 0x10, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False
    KeyRelease event, serial 28, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4706853, (74,267), root:(796,288),
    state 0x10, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    KeyPress event, serial 28, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4712422, (74,267), root:(796,288),
    state 0x10, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False
    KeyRelease event, serial 28, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4712534, (74,267), root:(796,288),
    state 0x10, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    KeyPress event, serial 28, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4713862, (74,267), root:(796,288),
    state 0x10, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False
    KeyRelease event, serial 28, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4713878, (74,267), root:(796,288),
    state 0x10, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    As you can see, they respond to the key codes 121. 122, and 123. Going to a console and running showkey, however, gives me the key codes 113, 114, and 115. I've tried mapping both, and the X11 symbols, with the same result. Below, a sample of xev's output when I bind the keys somewhere (out put for a single key, all result in the same output):
    FocusOut event, serial 29, synthetic NO, window 0x1600001,
    mode NotifyGrab, detail NotifyAncestor
    FocusIn event, serial 29, synthetic NO, window 0x1600001,
    mode NotifyUngrab, detail NotifyAncestor
    KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    And of course, nothing happens. The same happens whether I bind the keys in awesome or through xbindkeys. I have to admit, I'm pretty much out of ideas. Anyone seen this before?
    Last edited by mkaito (2010-06-16 15:06:06)

    d2ogch3n wrote:
    Here's what I have
        -- Multimedia keys
        awful.key({ }, "XF86AudioRaiseVolume",    function () awful.util.spawn("amixer set Master 2+") end),
        awful.key({ }, "XF86AudioLowerVolume",    function () awful.util.spawn("amixer set Master 2-") end)
    Just to clarify for anyone who comes across this, "%" is needed after the number. It should be:
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer set Master 2%+") end),
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer set Master 2%-") end)
    You should also be able to add Mute functionality:
    awful.key({ }, "XF86AudioMute", function () awful.util.spawn("amixer set Master toggle") end)
    Also, to get rid of the loading cursor, pass false as a second argument to all three of these:
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer set Master 2%+", false) end),
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer set Master 2%-", false) end)
    awful.key({ }, "XF86AudioMute", function () awful.util.spawn("amixer set Master toggle", false) end)
    The AWM wiki is the source for this:
    http://awesome.naquadah.org/wiki/Volume … nd_display

Maybe you are looking for

  • Browser Background Color

    I am new to iWeb and have searched the archives, but can't seem to figure this one out. I am using one of the themes to do a quick webpage, but have stumbled on an issue. When I use a browser background color, it bleeds over the page. I have tried to

  • HT1567 really stuck all working apart from no audio CD found so no connection from Ipod touch to Itunes found???

    Hi All, we are having a nightmare trying to get audio from the Ipod touch to a new computer, it registers everything when doing test with the following info optical drive detected no audio cd found. so we can upload photos but not music, anyone know

  • Organizer and network storage - everything is offline

    Have been using PSE 7 for quite some time. Over time, I have moved all my photos over to a NAS unit, but lately the photos turned up as offline in the Organizer. I took the opportunity to upgrade to PSE 9, started with a brand new project, and tried

  • Nokia 5230 - locking emails

    Hello, I have just got the Nokia 5230. I have put my gmail account on it so that I recieve emails straight to my phone which is great. Does anybody know if I can assign a password that needs to be typed in before I look at my email each time. I would

  • Blu-ray archiving

    Roxio's website, maker of Toast, states that blu-ray discs will hold 50gigs of data. is anyone out there using blu-ray on a mac for archiving purposes and if so, how much video are you getting on a single sided 25gig or a 50gig? I have a large librar