List of keyCodes?

Hello. I'm new to AS3, so go easy on me. =-)
I have code that enables some very basic manipulation of some
test movie clips; rotating, scaling, etc. based on keyboard inputs.
However, these keyboard events are limited to the F keys,
Enter, Delete, NumPad, i.e. the standard set of non-alphanumeric
keys.
How do I get the movies to respond to the user pressing 'q',
for example, or 't', or really any other 'mainstream' keyboard
buttons? Is there a list of keyCodes out there that can help me, or
am I thinking this through at the wrong angle? Thanks for any help.
=-)
-dE

Deggz,
>>> Thanks, Dave. I found it. I should mention I've
enjoyed
>>> your webiste and gleaned from it mroe than a few
solutions
That's nice to hear; thanks!
> Many, many thanks [to dzedward]! Worked like a charm.
This
> AS3.0 syntax is taking me a little while to ramp up on.
It all comes with time and practice. :)
Note that the constants of the Keyboard class (Keyboard.F1,
Keyboard.F2,
etc.) are really just stand-ins for numbers. Like dz said,
you're just
putting numbers into your switch() statements ... it's just
that some number
stand-alone, while others -- typically, commonly used keys --
have constants
that keep you from having to remember their numbers.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."

Similar Messages

  • Help...Cut list don't match

    We're about to use FCP and Cinema tool edit a film. Since it's our first time doing this, we are experimenting the workflow first. However, one problem has occured.When simulating the whole process(from importing the flex file to exporting the change list/film list), the keycode is sometimes 1 or 2 frames off. This worried us a lot. What did we do wrong. Here's our procedure:
    1. Cinema Tools > New Database
    2. Import > Telecine log
    3. Export > Batch capture
    4. Final Cut Por > Import > Batch List at 23.98 fps
    5. Choose Clip > Batch Capture
    6. Choose Database > Connect Clip
    7. Edit
    8. Export Cinema Tool Change list
    Pls kindly offer your opinion
    Thanks in advance
    Li Chen
    Mac Pro   Mac OS X (10.4.9)  

    Same issue here. Every cut in the film list is off by 4 frames. It is consistent, but strange. My CMX edl is perfect with the video timecode.
    Have you received any responses to your question?
    - Tom

  • How do I find out if the pressed key is printable?

    I have made a game and now I'm working on a hiscore table for it. But with my function the program doesn't know if the pressed key is printable or if it's shift, ctrl or something like that. And I made it possible to enter maximum 40 letters as name, so if the user holds the shift key for a while then the whole String is filled with shift characters and nothing shows on the screen and he/she isn't able to type in any more letters... So is there any way to find out if the pressed key contains a printable char?
    This is what my function looks like now. My program is quite big so I just post the function and try to explain what is happening
    /* high is an array of
    int score;
    String name;
    boolean WritingName;
    boolean GAMEOVER;
    boolean newgame;
    public void keyPressed(KeyEvent e) {
         if (GAMEOVER){  // checks if the game has ended
             char button = e.getKeyChar();
             int keyCode = e.getKeyCode();
             if (newgame){  // this is false if the hi-score list is showing otherwise its true. i.e. its true when typing name for hiscore list
                   if (keyCode == 10) {       // check if the pressed key is enter
                        WritingName = false;  // Tells an other function that the user has finished typing his/her name so it can save it and start showing the hiscore-list on the screen
                   } else {
                        if (keyCode == 8){    // check if the pressed key is backspace and if so removes the last char from the string
                             if (high[99].name.length() > 0){
                                  high[99].name=high[99].name.substring(0,high[99].name.length()-1); 
                        } else {  // if any other key is pressed then add it to the end of the string
                             if (high[99].name.length() <= 40 ) high[99].name += button;
                   paint(getGraphics());
              } else {  // checks if space is pressed to stop showing the hiscore-list and start a new game
                   if (keyCode == 32) newgame = true;
    }

    But with my function the program doesn't know if the pressed key is printable or if it's shift, ctrl
    or something like thatProbably the easiest way is to check and see if e.getKeyChar() < a space character or if e.getKeyCode() >= 127. You can use e.getModifiers() to get the modifier, etc... -- take a look at the documentation for java.awt.event.KeyEvent class.
    V.V.

  • Camera Collision Detection - Is It Possible?

    Hi,
    I am making a 3D RPG game and I would like to know if it is possible to get collision detection on a camera created in Adobe Director 11.  I have my 3D character running through an underground maze and he detects correctly on the walls of the maze.  However, I also have a camera as a child to the character so this moves with him.  I have added a bounding-box to this camera but it still doesn't detect whereas the gunBB works fine, as does the characterBB.
    This is really confusing and I don't know what I am doing wrong.  Any help would be really appreciated!
    Thanks, Phil.

    Thanks for the reply.  It is not exactly what I am looking for as the script is different than the style I am using.  This is the script I have got so far, I have also added an extra camera to view what is happening.
    property pSprite, p3Dmember -- reference to the 3D member
    --property pLevel, maze -- Level
    --property pLeftArrow, pRightArrow, pDownArrow, pUpArrow -- arrow keys
    --property pCharacter -- character in the 3D world
    --property pTofuBB, pGunBB, gun --  character + gun
    --property gUseGun, hasGun
    --property pCamera, pCameraBoundingBox --camera and bounding box
    --property barrier,mountains,exitmaze
    --property door1, door2, turret, turretgun
    --property keylist, keypresslist -- for keys pressed
    --on beginSprite me
    --  -- define the 3D cast member
    --  p3Dmember = sprite(me.spriteNum).member
    --  -- reset the 3D world
    --  p3Dmember.resetWorld()
    --  pSprite = sprite(me.spriteNum)
    --  pCamera = pSprite.camera
    --  -- define level as 3DS level Plane - must all be defined after resetWorld()
    --  pLevel = p3Dmember.model("landscape")
    --  mountains = p3Dmember.model("mountains")
    --  turret = p3Dmember.model("turret")
    --  turretgun = p3Dmember.model("turretgun")
    --  maze = p3Dmember.model("maze")
    --  exitmaze = p3Dmember.model("exitmaze")
    --  pCharacter = p3Dmember.model("hero")
    --  gun = p3Dmember.model("gun")
    --  barrier = p3Dmember.model("barrier")
    --  door1 = p3Dmember.model("door1")
    --  door2 = p3Dmember.model("door2")
    --  -- stop hero walking biped animation
    --  pCharacter.bonesPlayer.pause()
    --  -- below for key control
    --  keylist = []
    --  keypresslist = []
    --  -- this sets up a list of keycodes to track.
    --  -- this code covers the arrow keys only, it could be changed to cover a full range of keys
    --  repeat with i = 123 to 126
    --    keylist[i] = i -- this creates a list of keycodes to track
    --    keypresslist[i] = 0 -- this creates a "last state" list that corresponds to the keycode.
    --    --keypresslist tracks the last known state of that key, so we can tell when a keypress has changed.
    --  end repeat
    --  -- key control end
    --  createBoundingBoxes
    --  createLight
    --end
    -- code used to create bounding boxes
    --on createBoundingBoxes
    --  -- create tofu bounding box for character
    --  tofuBB_MR = p3Dmember.newModelResource("tofuBox",#box)
    --  tofuBB_MR.height = 235
    --  tofuBB_MR.width = 235
    --  tofuBB_MR.length = 500
    --  pTofuBB = p3Dmember.newModel("tofuBox",tofuBB_MR)
    --  pTofuBB.worldPosition = pCharacter.worldPosition
    --  -- create parent child relationships
    --  pCharacter.addChild(pTofuBB, #preserveWorld)
    --  invisShader = p3Dmember.newShader("invisShader",#standard)
    --  invisShader.transparent = TRUE
    --  invisShader.blend = 50
    --  pTofuBB.shaderlist = p3Dmember.shader("invisShader")
    --  pCamera = p3Dmember.newCamera("camera")
    --  frontCam = p3Dmember.newCamera("frontCam")
    --  frontCam.fieldOfView = 35
    --  frontCam.transform.position = vector(-14150,-3100,-600)
    --  frontCam.transform.rotation = vector(90,0,180)
    --  pSprite.camera = p3Dmember.camera("frontCam")
    --  pCamera.fieldOfView = 75
    --  pCamera.transform.position = vector(500,1800,450) --450
    --  pCamera.transform.rotation = vector(90,0,180)
    --  pSprite.camera = p3Dmember.camera("camera")
    --  cameraModRes = p3Dmember.newModelResource("cameraModRes",#sphere)
    --  cameraModRes.radius = 200
    --  pCameraBoundingBox = p3Dmember.newModel("CameraBoundingBox",cameraModRes)
    --  pCameraBoundingBox.worldPosition = pCamera.worldPosition
    --  pCameraBoundingBox.shaderList = p3Dmember.shader("invisShader")
    --  pCamera.addChild(pCameraBoundingBox, #preserveWorld)
    --  pCharacter.addChild(pCamera,#preserveWorld)
    --  -- create gun bounding box
    --  gun.worldposition.z = gun.worldposition.z + 200
    --  gunMR = p3Dmember.newModelResource("gunSphere",#sphere)
    --  gunMR.radius = 218
    --  pGunBB = p3Dmember.newModel("gunSphere", gunMR)
    --  pGunBB.worldPosition = gun.worldPosition
    --  pGunBB.shaderList = p3Dmember.shader("invisShader")
    --  pGunBB.addChild(gun, #preserveWorld)
    --end
    -- code below used to light up level
    --on createLight
    --  -- create a point 'bulb' type light
    --  p3Dmember.newLight("Bulb Light", #point )
    --  -- position the light
    --  p3Dmember.light("Bulb Light").transform.position = vector(0,0,100)
    --  -- define light color and intensity
    --  p3Dmember.light("Bulb Light").color = rgb(255,255,255)
    --  -- Make the character model a parent of the light
    --  -- Bulb Light becomes a child of pCharacter
    --  -- This is done so that the light will always move
    --  -- with the character.
    --  pCharacter.addChild(p3Dmember.light("Bulb Light"),#preserveParent)
    --end
    --on keyUp me
    --  --pCharacter.bonesPlayer.pause()
    --  --if keypressed("s")
    --end
    --on keydown me
    --  if keypressed("c") then changeCamera
    --end
    --on changeCamera
    --  -- check the sprites camera and switch
    --  if pSprite.camera = p3Dmember.camera("frontCam") then
    --     pSprite.camera = p3Dmember.camera("camera")
    --     else
    --     pSprite.camera = p3Dmember.camera("frontcam")
    --     end if
    --end
    --on exitFrame me
    -- below detects which keys are pressed
    --repeat with i = 1 to keylist.count
    --inewstate= keypressed( keylist[i] )
    --if keypresslist[i] <> inewstate then -- this means the key changed status from whether it's up or down
    --if inewstate= 0 then
    -- they key was released
    --keyLastReleased = keylist[i]
    --if (keyLastReleased=123) then pLeftArrow = 0 -- 123 = left arrow key
    --if (keyLastReleased=124) then pRightArrow = 0 -- 124 = right arrow key
    --if (keyLastReleased=125) then
    --pDownArrow = 0 -- 125 = down arrow key
    --pCharacter.bonesPlayer.pause()
    --end if
    --if (keyLastReleased=126) then
    --pUpArrow = 0 -- 126 = up arrow key
    --pCharacter.bonesPlayer.pause()
    --end if
    --else
    -- the key was pressed
    --keyLastPressed = keylist[i]
    --if (keyLastPressed=123) then pLeftArrow = 1 -- 123 = left arrow key
    --if (keyLastPressed=124) then pRightArrow = 1 -- 124 = right arrow key
    --if (keyLastPressed=125) then pDownArrow = 1 -- 125 = down arrow key
    --if (keyLastPressed=126) then pUpArrow = 1 -- 126 = up arrow key
    --end if
    --keypresslist[i] = inewstate-- update so we remember its new state.
    --end if
    --end repeat
    -- by the time this repeat loop has finished, keypresslist will contain a complete index of what keys
    -- are held down, and which aren't.
    -- Note: most keyboards have a limit on how many keys they'll track simultaneously.
    --checkCollisions
    --characterMove
    -- gun collision start
    --if gUseGun = TRUE then
    --pTofuBB.addChild(pGunBB,#preserveParent)
    --pGunBB.worldPosition = pTofuBB.worldPosition
    --pGunBB.worldPosition.z = 500
    --pGunBB.worldPosition.x = pCharacter.worldPosition.x - 150 --50
    ---pGunBB.worldPosition.y = -860
    --pGunBB.rotate(0,0,-240)
    --pCharacter.bonesPlayer.pause()
    --gUseGun = FALSE
    --hasGun = TRUE
    --end if
    -- gun collision end
    --end
    --on characterMove
    -- if the right arrow is pressed,
    -- rotate the character 5 degrees about the z-axis
    --if pRightArrow then
    -- rotate character and camera
    --pCharacter.rotate(0,0,-2)
    --end if
    --if the left arrow is pressed,
    -- rotate character -5 degrees about the z-axis
    --if pLeftArrow then
    --pCharacter.rotate(0,0,2)
    --end if
    -- if the up arrow is pressed,
    -- move the character 5 pixels along the y-axis
    --if pUpArrow then
    --if (pcharacter.bonesPlayer.playing = 0) then
    --pCharacter.bonesplayer.loop = true
    --if (_key.shiftDown) then
    --pCharacter.bonesPlayer.playRate = 2
    --if (hasGun = TRUE) then -- running
    --pCharacter.bonesplayer.play("hero", 1, 6270, 8330, 1)
    --else
    --pCharacter.bonesplayer.play("hero", 1, 2067, 4130, 1)
    --end if
    --else
    --pCharacter.bonesPlayer.playRate = 1
    --if (hasGun = TRUE) then -- walking
    --pCharacter.bonesplayer.play("hero", 1, 4200, 6200, 1)
    --else
    --pCharacter.bonesplayer.play("hero", 1, 0, 2000, 1)
    --end if
    --end if
    --end if -- bonesPlayer playing
    --if (_key.shiftDown) then
    --pCharacter.translate(120,0,0)
    --else
    --pCharacter.translate(50,0,0)
    --end if
    --end if
    -- if the down arrow is pressed,
    -- move the character -5 pixels along the y-axis
    --if pDownArrow then
    --if (pcharacter.bonesPlayer.playing = 0) then
    --pCharacter.bonesplayer.loop = true
    --if (_key.shiftDown) then
    --pCharacter.bonesPlayer.playRate = 2
    --if (hasGun = TRUE) then -- running
    --pCharacter.bonesplayer.play("hero", 1, 6270, 8330, 1)
    --else
    --pCharacter.bonesplayer.play("hero", 1, 2067, 4130, 1)
    --end if
    --else
    --pCharacter.bonesPlayer.playRate = 1
    --if (hasGun = TRUE) then -- walking
    --pCharacter.bonesplayer.play("hero", 1, 4200, 6200, 1)
    --else
    --pCharacter.bonesplayer.play("hero", 1, 0, 2000, 1)
    --end if
    --end if
    --end if -- bonesPlayer playing
    --if (_key.shiftDown) then
    --pCharacter.translate(-120,0,0)
    --else
    --pCharacter.translate(-50,0,0)
    --end if
    --end if
    -- floor collision
    --thisPosn = pTofuBB.worldPosition
    -----thisPosn.z = 1000
    --tModelList = [pLevel, maze, door1, door2] -- removed wall as its no longer on level
    --tOptionsList = [#levelOfDetail: #detailed, #modelList: tModelList]
    --thisData = p3Dmember.modelsUnderRay(thisPosn,vector(0,0,-1),tOptionsList)
    --if thisData.count then
    --totalCount = thisData.count
    --repeat with dataIndex = 1 to totalCount
    --terrainPosn = thisData[dataIndex].isectPosition
    --- if (thisData[dataIndex].model = pLevel) then
    --tDiff = (terrainPosn.z - pTofuBB.worldPosition.z) + 375
    --pCharacter.translate(0,0,tDiff,#world)
    --exit repeat
    --end repeat
    --end if
    --end
    --on checkCollisions
    --tModelList = [pGunBB, barrier, mountains, maze, exitmaze, turret, turretgun]
    --tOptionsList = [#maxNumberOfModels: 2, #levelOfDetail: #detailed, #modelList: tModelList, #maxDistance: 300]
    -- make 4 rays around character checking for collisions, 90 degrees apart
    --repeat with i = 1 to 18
    --pCharacter.rotate(0,0,20,#self)
    --returnData = p3Dmember.modelsUnderRay(pCharacter.worldPosition,pCharacter.transform.xAxis,tOptionsList )
    --if (returnData.count) then
    -- first in array is closest
    --checkObjectFoundDistance(returnData[1])
    --end if
    --end repeat
    --end
    --on checkObjectFoundDistance thisData -- check distance from collision with objects
    --dist = thisData.distance
    -- check if distance is less than width of bounding box
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"barrier":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"mountains":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"maze":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"exitmaze":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"turret":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --if (dist < 150) then
    --case thisData[#model].name of
    --"gunSphere":
    --gUseGun = TRUE
    --"turretgun":
    -- get distance of penetration
    --diff = 150 - dist
    -- calculate vector perpend icular to the wall's surface to move the character
    -- using the #isectNormal property
    --tVector = thisData.isectNormal * diff
    -- move the character in order to resolve the collision
    --pCharacter.translate(tVector,#world)
    --end case
    --end if
    --end

  • Traversing JList with arrow keys

    I've got a small problem when i try to traverse a JList with the arrow keys. When I'm at the first index of the list and press the UP arrow, I want to select the last index of the list.
    switch (keyCode){
            case VK_UP:
                    if(list.isSelectedIndex(list.getFirstVisibleIndex()))
                        list.setSelectedIndex(list.getLastVisibleIndex());
                    break;
    }When I use this code, the program selects the second last index (not the last). How can I fix this problem?
    Any suggestions will be appreciated.

    I found this thread useful but ultimately solved this another way using key binds. Maybe someone will find this useful.
    public MyDialogConstructor() {
        bindKeys();
    private void bindKeys() {
              InputMap inputMap = getJList().getInputMap(JComponent.WHEN_FOCUSED);
              KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0);
              inputMap.put(key, "jlist:UP");
              getJList().getActionMap().put("jlist:UP", new AbstractAction() {
                   private static final long serialVersionUID = 1L;
                   public void actionPerformed(ActionEvent e) {
                        if (getJList().isSelectedIndex(getJList().getFirstVisibleIndex())) {
                             getJList().setSelectedIndex(getJList().getLastVisibleIndex());
                        } else {
                             getJList().setSelectedIndex(getJList().getSelectedIndex() - 1);
              key = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0);
              inputMap.put(key, "jlist:DOWN");
              getJList().getActionMap().put("jlist:DOWN", new AbstractAction() {
                   private static final long serialVersionUID = 1L;
                   public void actionPerformed(ActionEvent e) {
                        if (getJList().isSelectedIndex(getJList().getLastVisibleIndex())) {
                             getJList().setSelectedIndex(getJList().getFirstVisibleIndex());
                        } else {
                             getJList().setSelectedIndex(getJList().getSelectedIndex() + 1);
         }

  • Compaq 6510b HAL keymap quirk does nothing

    Hi all !
    I wanted to drop keytouch and try out hal for my laptop's bonus keys. I added all the infos needed in the right fdi file :
    <match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" contains="6510b">
    <append key="input.keymap.data" type="strlist">e001:fn_esc</append> <!-- FnEsc -->
    <append key="input.keymap.data" type="strlist">e008:presentation</append> <!-- presentation -->
    <append key="input.keymap.data" type="strlist">e009:battery</append> <!-- FnF8 (battery) -->
    <append key="input.keymap.data" type="strlist">e00a:screenlock</append> <!-- FnF6 Lock -->
    <append key="input.keymap.data" type="strlist">e059:info</append> <!-- I key -->
    <append key="info.capabilities" type="strlist">input.keymap</append>
    </match>
    In fact, it was a copy/paste of another section, with only a removed key binding. The codes was OK.
    After restarting hal, I checked the keymap in use :
    $ lshal | grep keymap
    info.callouts.add = {'hal-setup-keymap'} (string list)
    info.capabilities = {'input', 'input.keyboard', 'input.keypad', 'input.keys', 'input.keymap', 'button'} (string list)
    input.keymap.data = {'e001:fn_esc', 'e008:presentation', 'e009:battery', 'e00a:screenlock', 'e059:info'} (string list)
    It seemed OK. But when I launched xev and pressed any key, for example the info key, no events were triggered and the following was immediately added to /var/log/everything.log :
    Jun 25 14:45:54 portable atkbd.c: Unknown key pressed (translated set 2, code 0xd9 on isa0060/serio0).
    Jun 25 14:45:54 portable atkbd.c: Use 'setkeycodes e059 <keycode>' to make it known.
    Jun 25 14:45:54 portable atkbd.c: Unknown key released (translated set 2, code 0xd9 on isa0060/serio0).
    Jun 25 14:45:54 portable atkbd.c: Use 'setkeycodes e059 <keycode>' to make it known.
    After that I found a patch for my laptop on the hal quirks site (http://www.nabble.com/Keymap-patch-for- … 55220.html), but it did not worked. The extra keys are always unknown.
    I searched the Web but don't found anything on this problem. Any idea on what can cause it ?
    Kernel 2.6.25, hal 0.5.11-1, Arch up-to-date.
    DAEMONS=(syslog-ng acpid @cpufreqd @sensors network openntpd netfs crond @alsa @hal !keytouch slim)

    I found this howto in the wiki : http://wiki.archlinux.org/index.php/Xor … otplugging . So I compiled xorg-server with hal enabled, and I restarted X. My mouse and my keyboard didn't worked anymore I managed to get on vc/1, and installed xf86-input-evdev. After rebooting, the input devices worked normally, so I presume that hal is correctly configured. I even saw the mouse plug/unplug events in /var/log/Xorg.0.log.
    I looked at lshal :
    vlad ~ $ lshal | grep keymap
    info.callouts.add = {'hal-setup-keymap'} (string list)
    info.capabilities = {'input', 'input.keyboard', 'input.keypad', 'input.keys', 'input.keymap', 'button'} (string list)
    input.keymap.data = {'e001:fn_esc', 'e008:presentation', 'e009:battery', 'e00a:screenlock', 'e033:f22', 'e059:info'} (string list)
    The keycodes are OK for the extra keys.
    BUT... They're still unknown... So I'm at the same point as at the begining.
    Edit : not exactly the same point... If there's an update of xorg-server package, I suppose the X hal support of my laptop will be lost ? So, I must blacklist this package in pacman and compile every update, right ?
    Last edited by Vladislav IV (2008-06-26 18:30:54)

  • Only accept a list of defined code (Keycode validation)

    Hi there,
    I'm looking for a way to only accept a list of defined keycode into my FormsCentral.
    If the keycode does not match a list, an error message show up (Like: Incorrect Keycode, Please verify your information)
    Is it possible to do that?
    Any idea how?
    Thank you!

    Are you getting an error or fatal error? Is your error handler returning or throwing an exception?

  • Using List Selection Listeners....Please GUIDE

    Hello
    I am using Java Swing and am displaying elements using JList.
    Each element of the List performs a certain function.
    On press of the Key,the function is invoked.
    Now,I am using the ListSelectionListener for moving up and down the list
    and the KeyListener for selecting the element on press of the Key.
    I would like to combine both of them into one (i.e go up and down the list
    and on press of the key the concerned element chosen performs the function).
    How can I combine both of them?
    At present this is what I am doing..I'd like to combine this together
    Please can anyone help
    m_list.addListSelectionListener(
              new ListSelectionListener(){
                   public void valueChanged(ListSelectionEvent e){
                   System.out.println(m_list.getSelectedValue());
    // ** item selected and key pressed.
    m_list.addKeyListener(new KeyAdapter() {
         public void keyPressed(KeyEvent e) {
                                         int keyCode = e.getKeyCode();
                         if (keyCode == KeyConstants.VK_ACTIVATE) {
                     // PERFORM THE Element function.                                                  
    });

    You sound like you want to use actions. See [url /thread.jsp?forum=57&thread=401315]this thread (you can ignore the text field part).
    Kind regards,
      Levi

  • X230+1 Wish List Thread

    Hi all!
    Because it's my birthday, I thought I'd make a wish or two
    I've been keen to upgrade my X200 for the last couple of years, but the newer generations never quite do it for me. This time I thought the community could offer up some wish lists for the next generation X-Series (X240?) during the development cycle (in the hopes that Lenovo will read it), rather than just complaining about the new model after its release. ;-)
    (this is about the regular X-Series, not the tablet)
    Here goes my list:
    Higher resolution IPS screens - 768 vertical pixels just don't cut it. Bonus: Install a 13 inch screen - I'm convinced it would fit in the existing case given the large bezel.
    Allow 3 simultaneous digital video outputs. Sandy Bridge's graphics does support this, but the X230 does not (don't understand why). The high-end docks have 4 digital video outputs - would be nice to be able to make use of more of them!
    The mSATA slot should support SATA3 - a lot of people like having a big spinning disk in the drive bay and a fast SSD in the mSATA slot. All current generation mSATA drives support SATA3. I know that means sacrificing SATA3 support on the dock, but I think that's ok - we have USB3 now anyway.
    Don't put the audio and network ports on the right-hand side - that's where I put my mouse! Network on the left, audio on the front (or left as a last resort - sorry lefties!).
    Fix the trackpad: I'm a trackpoint guy, but a second option that works well would be nice.
    Fix the keyboard layout: I can live with chiclets, but please revert the layout to the time-tested ThinkPad layout. Bonus: Allow the X220 keyboards to work in newer generations (BIOS update to fix the keycodes).
    A little thinner! It should be built like a tank, but does it need to look like one?
    It would be nice if we could have WWAN + mSATA in the same machine - no idea if this is possible.
    All USB ports should be USB3 - and an extra USB port would not go amiss.
    Quad core CPU options would be nice, but I get that it may not be possible due to the TDPs.
    Obviously keep up the great build quality, tech support, docking and battery options.
    That's mine. Next!

    Kudos to your list.  Well done.  Without question, for me is the need for a higher resolution screen.  And, as noted, I too would like to think it could be installed in thes same size case.  Apple has figured it out.  I have had a T400S, and two X220T's.  I love them, but I cannot buy another (X230 or future X240) unless they include a higher res screen.  Sorry Lenovo, but your current res is way too out dated.  Please get with the program.  Another thought is to shrink your new X1Carbon down to a 13" size.
    I currently expand my screen real estate to a second, external monitor.  I would like to be able to expand my screen real estate to the laptop screen and two external monitors.
    A larger SSD drive (256) would be nice.
    I never use the track stick. I am a dedicated trackpad gyy and it would be nice for a better trackpad but don't eliminate the right and left buttons. 
    Thinner is always nicer.
    Hopefully lenovo is listening.
    Thanks.

  • Keycode missing in Crystal Reports Basic for Visual Studio 2008

    I just upgraded from Visual Studio 2005 Professional to Visual Studio 2008 Professional (with SP1 installed also).  Crystal Reports Basic for Visual Studio 2008 is listed as installed under the VS Help dialog, but no key code is shown.  And when I attempt to open a Crystal Report, I get a dialog saying 'Please wait while Windows configures Crystal Reports Basic', which eventually terminates with an 'Invalid Keycode' message.
    I've tried repairing the Visual Studio install, and even uninstalling and reinstalling the whole thing.  To no avail.
    Other facts: My VS 2005 version still works with its version of Crystal Reports.  I am running Vista Professional.  Looking in the registry, under HKEY_LOCAL_MACHINE | SOFTWARE | Crystal Decisions | Crystal Reports | VSNET | Keycodes | CR9 NET, I see a Type REG_SZ with a data value in the form xxxxxx-xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxx [6 chars-7 chars-26 chars].
    Help! How do I get Crystal Reports Basic for Visual Studio 2008 to work?

    Hi Elaine,
    Thanks for your response.  I do have versions of Visual Studio 2003 and Visual Studio 2005 on my machine, and the earlier versions of Crystal Reports worked with these versions.  In addition to the registry key I cited earlier (which I now understand is a VS 2003 version), there is an entry under HKEY_LOCAL_MACHINE | SOFTWARE | Crystal Decisions | Crystal Reports | 10.2 | Crystal Reports | KeyCodes | CR Ent.  I see that you are correct, and this corresponds to my VS 2005 installation (which still works).  However, there is NO entry under HKEY_LOCAL_MACHINE | SOFTWARE | Crystal Decisions | Crystal Reports | 10.5 (the CR  Basic for Visual Studio 2008 path you indicated).  There is an entry under HKEY_LOCAL_MACHINE | SOFTWARE | Business Objects | 10.5 | Crystal Reports, but it has only keys for ChartSupportPath, CommonFiles, DisablecheckForUpdates, and Path.
    The Windows\assembly folder has 25 files that are CrystalDecisions.xxx, version 10.5.3700.0.  This is consistent with my seeing 'Crystal Reports' listed as installed in VS 2008 Help.  But no KeyCode!
    I tried a complete uninstall and reinstall of VS 2008, without luck.  I can't clean my system of earlier verions of Crystal Reports, because I am still supporting a body of work that I did under VS 2005, and I can't convert all this stuff to 2008 -- at least until I have a fully working VS 2008 suite.  After this experience, I fear that if I were to uninstall an earlier version, i might never get it back!
    I've spend quite a few hours on this with no luck, so any help would be enormously appreciated.

  • Javascript to disable list keyboard key

    How can I disable the effect of the list key using Javascript?, I want to block this key in a BSP application.
    Thanks in advance,
    Ruben.

    I think you mean the spacebar key. Hope this help:
    <head>
    <script>
    function Aonkeypress(){
         var nav4 = window.Event ? true : false;
         var key = nav4 ? event.witch : event.keyCode;
         if( key == 32 )
              return false;
         return true;
    document.onkeypress=Aonkeypress
    </script>
    </head>
    best regards,
    Antonio.

  • Xcelsius 2008 won't accept keycode

    I just upgrade to Xcelsius SP1 FP1.  Everything seemed to work great and I have the new version.  However, everytime I open Xcelsius it asks for my keycode.  I enter the correct keycode and the program opens and appears to be active.  However, I repeat this the next time I open Xcelsius.
    I have tried the instructions for "set_registry_permissions" with no luck.
    Any help would be appreciated.
    Thanks!
    -Greg

    Post Author: abrat
    CA Forum: Xcelsius and Live Office
    As a workaround to the issue of Xcelsius
    2008 not installing with Office XP, users can manually add a registry key to
    enable installation.   Please make a backup copy of the registry before making any
    changes.
    Manual Change
    1.       Go to Start > Run.  Start the registry editor by
    entering 'regedit'.
    2.       Select the folder HKEY_LOCAL_MACHINE and navigate to
    \Software\Microsoft\Office\
    3.       Create an 11.0 folder, if it doesn't exist, by
    selecting Edit > New > Key from the menu.
    4.       Create a subfolder called PowerPoint
    5.       Create a subfolder under PowerPoint called
    InstallRoot
    You should now have the folder structure listed
    below:HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\PowerPoint\InstallRoot
    6.       From the InstallRoot folder create a string value
    called "Path" by selecting Edit > New > String Value.
    7.       Select the newly created Path value and select Edit
    > Modify.
    8.       Under the Value Data field enter "C:\Program
    Files\Microsoft Office\Office11\"
    9.       Click OK.
    10.   Exit the registry editor.
    11.   Reboot your machine.
    You should now be able to install
    Xcelsius 2008.
    Please note that although
    all other Office XP applications will work, Xcelsius 2008 export to Word
    produces a blank document.

  • Film list in Cinema Tools from 25 telecine, edited in a DV PAL-24 sequence

    Hello professionals out there in the binary world,
    I am looking for 24/25/24 answer to my problem and going thru all the questions like mine with no answer is just depressing !!!
    Here is the problem:
    We are editing on Final Cut Pro 4 with Cinematools 2.1
    16mm shot at 24 FPS with a TC at 25fps to edit at 24fps in FCP 4
    Sound recorded at 24FPS (Cantar)imported thru sebskytools...
    We edited in a sequence DV PAL-24
    (24@25 not available on FCP4)
    Sound SEEMS ok as I need everything at 24FPS (quicktime movie, omf and edl)
    For the image, I need a cut list for the negative cutter, when I want to make it in FCP4, in the settings, it doesn't allow me to change the TC rate to 25, it's greyed out, I have no choice else than 24...EVEN if I logged the database saying it was a 25fps TC.
    In the database it's ok but it's not available in the FCP film list settings.
    First weird thing..WHY ???
    When the list is done, it says at the beginning and for all the clips used in the edit: "warning, the clip x does not have a telecine speed of 24FPS".... But the keycodes seems ok (same as my timeline)
    SECOND PROBLEM:
    I also need to tape the movie on beta for that negative cutter and it should be at 25FPS, like the TC otherwise the time won't correspond...HOW ??? Is it possible ?
    Thanks for any information you could give me to clear it up a little bet !
    All that 24/25 is a little cloudy in my mind, I would be thrilled if someone could blow those clouds away !
    Marie
    Final Cut Pro 4 / Cinema Tools 2.1   Mac OS X (10.3.1)  

    Hi Marie
    Cloudy.....its a pea souper. Below is a cut and paste of some of the answers I have given in other threads. Also, I would get FCP5 studio as it is much better at all this.
    Hi
    This is the one area where avid beats FCP. 24fps Pal. I have now used FCP on a couple of PAL features and it is a bit of a pain. I also have the Apple pro support but most of this is all new to them.
    Lets start with picture. As you know, you can either make tape/dvds that are the correct running length of the film and include a repeat frame or you can make them playing 4% fast with a pitch change but smooth pictures (1 frame film = 1 frame video). Most of the time, ie. when you are editing you will use the first method and live with the repeat frame. However, for VFX work and the NEG CUT or DI you will need to make 25 frame playouts.
    The avid does this well but FCP is a pain.
    One work around for the fast output is to export a QT of the cut and use cinema tools to conform it to 25fps. Some neg cutters or Digital labs will work to a QT, if they don't, then the 25fps QT can be imported into a new 25fps pal project so you can make a tape for the neg cutter which has the correct time code and you will have machine control. (Hint, I burn in 25fps TC when I make the QT). The edl will depend on your choice of film key number cut lists or a video edl. Key code lists work well but most neg cutters/labs dont like them. If you need an EDL then it should be made in the main 24@25 project but you need to set the edit code to 25fps before you make the edl. This is changed in the browser by going to TC RATE where it is set to 24@25 speed and right clicking. this gives you the option of changing the edit to 25 or 24 as well as 24@25. Most of the time while I cut, I have the edit set to 24fps not 24@25. Then I can see how long the show is running, how long a clip is etc.
    Sound. Most people in the UK get rushes synched at the lab/tk house. They speed up the sound to match the speeded up picture. That blows the idea of an omf unless you are ok with the sound going through an analogue transfer which includes a speed change. If not, you will have to reconform from the original dats.
    You must get flex files which will track the original location dat tapes and their time codes. These are used to in Cinema tools to make the batch capture list. When you want to make an edl at the end you will use EXPORT...CINEMA TOOLS AUDIO EDL.
    Your audio post house may require a video tape with each reel having time code starting on the hour. That is very tricky and I tend to go back to my avid for that. You can do it by doing a crash record with the added frame and loading that back into a 25fps project. Then making tapes from there as you will now have machine control. Not pretty and quite time consuming. If they will work from QT files its easier.
    I think you may have imported the audio which I haven't done in FCP yet. I will try BWAV import one day as they work well on the avid but have been told they don't work well on FCP. If they are working well for you then the omf route should be great. Let me know how you get on with audio.
    I have managed to get through PAL features shot at 24 with FCP, but it sure is more work than on an avid, mostly for the assistant editors. However, I like cutting on FCP.
    Best

  • Creating search field for a list component

    i have created a glossary of terms using the list component and populating it via an XML file.
    what i would like to do is create a search field that as the user types in the search bar if there are any matching entries in the list, the focus/selection jumps to that particular item in list. i don't want to clear the list just go to the item that matches.
    i would like it to be predictive so if i have these entries:
    samson
    seek
    seether
    south
    and the user types "s" in the search box to the first "s" entry in the list (samson) is selected, if they type "se" the selection jumps to the first entry with "se" in it (seek) if they type "seet" the selection jumps to "seether" and so on.
    i have absolutely no idea how to do it, but more importantly...is this possible?
    i have attached the sample files that i have been working on.
    thanks in advance

    You need the lowercase. the keyCode of the keybpardevent returns the key's uppercase charcode. So the A-key allways returns 65. Therefore convert keycode to char and to lowercase before appending after what's allready there in the field.
    To have the user not have to type the words with proper casing, convert the label to lowercase before doing the indexOf search.
    import fl.data.DataProvider;
    //-------declare vars----------------
    var firstClick:Boolean=true;
    var loader:URLLoader = new URLLoader();
    var dp:DataProvider = new DataProvider();
    var xml:XML;
    //-------add listeners---------------
    loader.addEventListener(Event.COMPLETE,onLoaded);
    glossary.lb.addEventListener(Event.CHANGE, itemChange);
    glossary.search_bar.addEventListener( FocusEvent.FOCUS_IN, clearbox );
    glossary.search_bar.addEventListener( KeyboardEvent.KEY_DOWN, onSearch );
    //-------functions--------------------
    //clears the input field when the user clicks into it for the first time
    //eliminates the need for them to highlight and delete the "type search here" text
    function clearbox( e:FocusEvent ):void {
        if (firstClick==true) {
            glossary.search_bar.text="";
            firstClick=false;
    //populate description box with definition when item is selected
    function itemChange(e:Event):void {
        glossary.ta.text=glossary.lb.selectedItem.data;
    //creates the data provider for the list based off external XML file
    //arranges the items in alphabetical order
    //populates the list
    function onLoaded(e:Event):void {
        xml=new XML(e.target.data);
        var il:XMLList=xml.channel.item;
        for (var i:uint=0; i<il.length(); i++) {
            dp.addItem({data:il.description.text()[i],label:il.title.text()[i]});
        dp.sortOn("label");
        glossary.lb.dataProvider=dp;
        glossary.ta.text="Please make a selection below";
    //dynamic search engine to locate items in the list
    function onSearch( e:KeyboardEvent ):void {
        trace( e.keyCode );
        var input:String = ( glossary.search_bar.text + String.fromCharCode( e.keyCode ).toLowerCase() );
        trace( input )
        for (var i:uint = 0; i < dp.length; i++) {
            if (dp.getItemAt(i).label.toLowerCase().indexOf(input)==0) {
                glossary.lb.selectedIndex=i;
                glossary.ta.text=glossary.lb.selectedItem.data;
                break;
            } else {
                glossary.ta.text="no matching searches";
    //-------load the xml--------------
    loader.load(new URLRequest("xml/movie1.xml"));

  • Editable combo box - changing list

    hey all,
    I have to capture a code, which may be one of many types, and have planned on using an editable combo box, which narrows down the available options as the user types into it - as many programs use.
    Problem is that I'm not sure what it is I need to do to make this work. So far I've got my own ComboBoxModel implementation, and I had tried listening to edit changes, and changing the list based on that. Problem is I cant mutate in the middle of the notification, so no luck there.
    Anyone have any ideas how to make this work?
    cheers
    dim

    ttarola:
    I'm not sure if I've misinterpreted your advice, but I couldn't get it to work... here's what I've done:
    public class TestKeyListener extends KeyAdapter
      private int lastItemIndex = -2;
      private final JComboBox comboBox;
      public TestKeyListener(JComboBox comboBox)
        this.comboBox = comboBox;
       * Invoked when a key has been released.
       * As you are typeing in this field it tries to help you to coomplete the
       * expression you are looking for.
      public void keyReleased(KeyEvent e)
        int keyCode = e.getKeyCode();
        JTextField editBox = (JTextField) comboBox.getEditor().getEditorComponent();
        String typedText = editBox.getText();
        int typedTextLength = typedText.length();
        // nothing has been written
        if (typedTextLength == 0)
          comboBox.setSelectedItem("");
          return;
        boolean isDelete = ((keyCode == e.VK_DELETE) || (keyCode == e.VK_BACK_SPACE));
        if (isDelete || (e.getKeyText(keyCode).length() == 1))
          String item;
          for (int i = 0; i < comboBox.getItemCount(); i++)
            item = comboBox.getItemAt(i).toString();
            if (item.startsWith(typedText))
              // after deleting the same item is the actual one
              if (isDelete && lastItemIndex == i)
                return;
              lastItemIndex = i;
              comboBox.setSelectedIndex(lastItemIndex);
              editBox.setText(item);
              editBox.setCaretPosition(typedTextLength);
              editBox.select(typedTextLength, item.length());
              return;
      public static void main(String[] args)
        final JFrame frame = new JFrame("test2");
        frame.addWindowListener(new WindowAdapter()
          public void windowClosing(WindowEvent ev)
            frame.dispose();
            System.exit(0);
        JComboBox comboBox = new JComboBox();
        for (int j = 0; j < 50; j++)
          if (j % 10 == 0) comboBox.addItem("A" + j / 10 + "77" + j);
          if (j % 10 == 1) comboBox.addItem("B" + j / 10 + "77" + j);
          if (j % 10 == 2) comboBox.addItem("C" + j / 10 + "77" + j);
          if (j % 10 == 3) comboBox.addItem("D" + j / 10 + "77" + j);
          if (j % 10 == 4) comboBox.addItem("E" + j / 10 + "77" + j);
        comboBox.setEditable(true);
        comboBox.addKeyListener(new TestKeyListener(comboBox));
        frame.setBounds(1, 1, 500, 300);
        frame.getContentPane().setLayout(new FlowLayout());
        frame.getContentPane().add(comboBox);
        frame.setVisible(true);
    }this doesn't really bother me, as the other poster has solved my problem (see next post)...
    cheers
    dim
    cheers
    dim

Maybe you are looking for