Problem: sqldeveloper 1.5 key bindings in mac os x
Hi -
I just installed the new sqldeveloper (1.5.0.53.38) on Mac OS X Leopard, and when I try to edit sql queries in the worksheet, I'm finding that many keys don't work. For example, the spacebar and delete keys do nothing.
I tried loading various different accelerator presets:
- after loading "Default MacOS X" set, neither space nor delete keys do anything
- after loading "Default", "Classic" or "Brief" sets, the spacebar works, but not delete
I tried to fix this by changing the accelerators through the Preferences UI, but I couldn't figure out how to assign the 'backspace' key to the 'delete-previous' accelerator (since it doesn't seem possible to type the actual backspace character in the keystroke box...). I was able to fix the delete key by editing settings.xml by hand, changing this:
<Item class="oracle.javatools.util.Pair">
<first class="java.lang.String">delete-previous</first>
<second class="oracle.ide.keyboard.KeyStrokes">
<data>
<Item class="javax.swing.KeyStroke">[0]</Item>
</data>
</second>
</Item>
to this:
<Item class="oracle.javatools.util.Pair">
<first class="java.lang.String">delete-previous</first>
<second class="oracle.ide.keyboard.KeyStrokes">
<data>
<Item class="javax.swing.KeyStroke">[8]</Item>
</data>
</second>
</Item>
I was able to get the spacebar to work again by removing the association between the spacebar key and the completion-insight accelerator, using the Preferences UI.
So, my questions are:
- Do I have some weird setup where my delete key is [8] instead of [0]? I'm trying to tell if this is a problem with my environment or with the settings that are shipped with the product.
- If it's the latter, could the default MacOS X accelerator settings be updated? I seem to remember this same problem happening the last couple of times I installed a new version of SQL Developer.
Let me know if there's any other information I could provide that would be useful.
Thanks!
Another problem I found with the MacOS X key bindings: the 6 key doesn't work!
In the config that ships with SQL Developer, I found this:
<Item class="oracle.javatools.util.Pair">
<first class="java.lang.String">DOCUMENT_6_CMD_ID</first>
<second class="oracle.ide.keyboard.KeyStrokes">
<data>
<Item class="javax.swing.KeyStroke">6</Item>
</data>
</second>
</Item>
which should be:
<Item class="oracle.javatools.util.Pair">
<first class="java.lang.String">DOCUMENT_6_CMD_ID</first>
<second class="oracle.ide.keyboard.KeyStrokes">
<data>
<Item class="javax.swing.KeyStroke">meta 6</Item>
</data>
</second>
</Item>
Similar Messages
-
Problem changing default key bindings using Oracle Terminal
Hello,
I'm facing a problem changing default key bindings using Oracle Terminal. I changed
some bindings, saved them in forms60/fmrusw.res, started the generation and saved again.
I thought that's it but it wasn't. It took no effect at all in Forms (even after recompilation) although reopening the file in Terminal showed the changes. I'm using Forms in German, which means that even the key bindings displayed in Forms are translated i.e. STRG+F1 instead if CTRL+F1,
but I can't find a german version of this resource file, so i think it's the same resource file for all supported languages. But what is needed for the changes to take effect ?
Thanks in advance
STD
nullHi,
is it client/server you are working?
if so you should not be using the fmrusw.res file because I guess your NLS_LANG is German_Germany.WE8ISO8859P1 or something like that. This means the terminal that is being opened is fmrdw.res instead of fmrusw.res and this file should be edited using Oracle Terminal.
if you are working via the web implementation than you can open the file fmrweb.res in a text editor and change the keybindings in there. If you need to have the PC like key bindings on the web just open the fmrpcweb.res and see if it contains the German texts. If so you can either copy this file over the frmweb.res file or you can specify term=fmrpcweb.res in the serverargs parameter.
Hope this helps.
Kind regards,
Frank van der Borden
Oracle Support Services
Netherlands -
Authentication problem - solved, but maybe a bug in Mac OS X?
Hi,
I've a rather small installation with only a handful of users configured on a Mac mini (Mac OS X Server, 10.6.8). All of them use the mail, calendar and addressbook server on the Mac, nothing more. They use it with Mac, iPhone and iPad. Everything worked fine for months but suddenly all of them were faced authentication problems: it was not possible to login on the imap server, the calendar server, the addressbook server. It was possible to login using the admin account on the server directly. Moreover, all users disappeared from the workgroup manager, however they still were available on the servers LDAP server and findable using ldapsearch.
First, I used to completely restart the server to solve the problem, but it reappeared after only few hours again.
Second, after understanding more about the authentication process, I found the "killall DirectoryService" was sufficient to solve the problem, but it still reappeared after few hours.
Then I found the, once the problem occured, there was nearly no more communication to the local LDAP server on port 389 on localhost. When everything was working fine, the was a lot of such communication, including queries for usernames, when a login attempt was made. I started a "tcpdump -n -i lo0 port 389" and waited for the problem again. After the problem occured, I found in the pcap files that there were a few final query attempts, actually attempts the open a port 389 TCP connection to the slapd running on localhost, which were answered with a TCP RST. Then, no more attempts were made until l restarted the DirectoryService. Using the logfile of the slapd I found that this happened exactly at the time the slapd was stopped and restarted. And - surprisingly for me - stopping and restarting the slapd happened exactly once an hour.
I then found that it happened exactly at the time the time machine backup process was started and indeed it was possible to trigger the event of restarting the slapd by manually starting a time machine backup.
(Indeed, I switched my backup strategy from SuperDuper to time machine the other day and maybe that was the time the problem occured for the first time. I know that time machine is not considered as the best backup strategy for a server but I wanted to try on my own.)
Google helped my to find a hint that time machine will actually stop and restart slapd - which is a generally a good idea, since otherwise a backup from some open database files would be made, which could work but may fail. So, I thing, someone of the developers thought about that problem too and has considered time machine for backups of a server.
However, a not running slapd can not answer queries from a DirectoryService and a stopping or starting process might indeed end up with TCP SYNs answered with TCP RST.
My solution was to disable time machine again and from that time the problem does not occur again.
I'm wondering why the DirectoryService process isn't starting to query the slapd again after a failed connection. Isn't this a bug? After this experience I consider time machine as not only the not preferred backup solution for a server but as completely incompatible with Mac OS X server - although, as I said, it seems that someone thought about backing up the LDAP database using time machine.
(On a Lion server this problem does not occur, the slapd will not be stopped and restarted when time machine is running. Moreover, I saw a com.apple.slapd.start notification in the slapd.log ... maybe this tells DirectoryService to try again.)
Cheers,
WolfgangAnother problem I found with the MacOS X key bindings: the 6 key doesn't work!
In the config that ships with SQL Developer, I found this:
<Item class="oracle.javatools.util.Pair">
<first class="java.lang.String">DOCUMENT_6_CMD_ID</first>
<second class="oracle.ide.keyboard.KeyStrokes">
<data>
<Item class="javax.swing.KeyStroke">6</Item>
</data>
</second>
</Item>
which should be:
<Item class="oracle.javatools.util.Pair">
<first class="java.lang.String">DOCUMENT_6_CMD_ID</first>
<second class="oracle.ide.keyboard.KeyStrokes">
<data>
<Item class="javax.swing.KeyStroke">meta 6</Item>
</data>
</second>
</Item> -
Hello,
Yesterday my macbook pro was working fine and i left it before sleeping working and it's go into slepping mode after battery discharged.
today morning i turned it on and i got this message after many times of automatic restart :
" Your computer restarted because of a problem. Press a key or wait a few seconds to continue starting up "
i have searched for the problem and the way to solve it i found many articles and helpful solutions but never changed !
and that's what's happened exactly:
1. I booted into safe mode for only one time and i can't boot again and i don't know why?
2. After botting in safe mode i deleted all non-app store apps and, then restart
3. Still rebooting and the message appear.
4. reseting PRAM
5. Repairing and verifying permissions and disk. = some errors in itunes/resources/.... serval times of repairing and nothing effect on errors.
6. Hardware test = no troubles found.
7. Reinstall OS X mountain lion = i got a message that my apple id is not purchased mountain lion because i bought my mac earlier 2012 with leopard and i have upgraded may be from another Apple id i can't remember.
No backups to restore, and i have a wealth of my work databases i can't return it back
Please helpMorning from QA,
my macbook pro now working and i got this report and sent it to apple.
Interval Since Last Panic Report: 1362 sec
Panics Since Last Report: 1
Anonymous UUID: E6D04971-1F3E-80D5-1BC9-1B89279EBEA3
Sat Oct 5 21:58:28 2013
panic(cpu 0 caller 0xffffff80034b8945): Kernel trap at 0xffffff7f83fb104c, type 14=page fault, registers:
CR0: 0x000000008001003b, CR2: 0xffffff80b2f2a000, CR3: 0x000000000bb29018, CR4: 0x00000000000606e0
RAX: 0x0000000000000500, RBX: 0xffffff80b2f28c00, RCX: 0x0000000000bfbfbf, RDX: 0xffffff7f83fb98d0
RSP: 0xffffff8081b12900, RBP: 0xffffff8081b13af0, RSI: 0x0000000000000020, RDI: 0xffffff80b2f28c00
R8: 0x0000000000000fee, R9: 0x0000000000010000, R10: 0x0000000000000000, R11: 0x000000007fffffff
R12: 0x0000000000000fee, R13: 0x0000000000000800, R14: 0x0000000000000000, R15: 0x0000000000000020
RFL: 0x0000000000010206, RIP: 0xffffff7f83fb104c, CS: 0x0000000000000008, SS: 0x0000000000000010
Fault CR2: 0xffffff80b2f2a000, Error code: 0x0000000000000002, Fault CPU: 0x0
Backtrace (CPU 0), Frame : Return Address
0xffffff8081b125a0 : 0xffffff800341d636
0xffffff8081b12610 : 0xffffff80034b8945
0xffffff8081b127e0 : 0xffffff80034cebfd
0xffffff8081b12800 : 0xffffff7f83fb104c
0xffffff8081b13af0 : 0xffffff7f83fa7d51
0xffffff8081b13b50 : 0xffffff7f83fb1503
0xffffff8081b13b70 : 0xffffff7f83fac770
0xffffff8081b13b90 : 0xffffff7f83fb1bba
0xffffff8081b13bc0 : 0xffffff8003870b13
0xffffff8081b13c20 : 0xffffff800386e74f
0xffffff8081b13d70 : 0xffffff8003498c21
0xffffff8081b13e80 : 0xffffff8003420b4d
0xffffff8081b13eb0 : 0xffffff8003410448
0xffffff8081b13f00 : 0xffffff800341961b
0xffffff8081b13f70 : 0xffffff80034a6546
0xffffff8081b13fb0 : 0xffffff80034cf473
Kernel Extensions in backtrace:
com.apple.iokit.IOGraphicsFamily(2.3.7)[9928306E-3508-3DBC-80A4-D8F1D87650D7]@0 xffffff7f83f9e000->0xffffff7f83fd5fff
dependency: com.apple.iokit.IOPCIFamily(2.8)[2FAEA49C-EA4C-39C6-9203-FC022277A43C]@0xffffff 7f83a75000
BSD process name corresponding to current thread: WindowServer
Mac OS version:
12F45
Kernel version:
Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64
Kernel UUID: EA38B02E-2B88-309F-BA68-1DE29F605DD8
Kernel slide: 0x0000000003200000
Kernel text base: 0xffffff8003400000
System model name: MacBookPro8,1 (Mac-94245B3640C91C81)
System uptime in nanoseconds: 61714428675
last loaded kext at 61660768085: com.apple.driver.AppleHWSensor 1.9.5d0 (addr 0xffffff7f84d07000, size 36864)
loaded kexts:
org.virtualbox.kext.VBoxNetAdp 4.2.14
org.virtualbox.kext.VBoxNetFlt 4.2.14
org.virtualbox.kext.VBoxUSB 4.2.14
org.virtualbox.kext.VBoxDrv 4.2.14
com.apple.driver.AppleHWSensor 1.9.5d0
com.apple.iokit.IOBluetoothSerialManager 4.1.7f2
com.apple.driver.AudioAUUC 1.60
com.apple.driver.AppleTyMCEDriver 1.0.2d2
com.apple.driver.AGPM 100.13.12
com.apple.filesystems.autofs 3.0
com.apple.driver.AppleMikeyHIDDriver 124
com.apple.iokit.IOBluetoothUSBDFU 4.1.7f2
com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport 4.1.7f4
com.apple.driver.AppleUpstreamUserClient 3.5.12
com.apple.driver.AppleHDAHardwareConfigDriver 2.4.7fc4
com.apple.driver.AppleHDA 2.4.7fc4
com.apple.driver.SMCMotionSensor 3.0.3d1
com.apple.driver.AppleSMCPDRC 1.0.0
com.apple.driver.AppleMikeyDriver 2.4.7fc4
com.apple.driver.AppleSMBusPCI 1.0.11d1
com.apple.driver.ACPI_SMC_PlatformPlugin 1.0.0
com.apple.driver.AppleLPC 1.6.3
com.apple.driver.AppleSMCLMU 2.0.3d0
com.apple.driver.AppleBacklight 170.3.5
com.apple.driver.AppleMCCSControl 1.1.11
com.apple.driver.AppleIntelHD3000Graphics 8.1.6
com.apple.driver.AppleIntelSNBGraphicsFB 8.1.6
com.apple.driver.AppleMuxControl 3.4.5
com.apple.iokit.IOUserEthernet 1.0.0d1
com.apple.Dont_Steal_Mac_OS_X 7.0.0
com.apple.driver.ApplePolicyControl 3.4.5
com.apple.driver.AppleUSBTCButtons 237.1
com.apple.driver.AppleUSBTCKeyEventDriver 237.1
com.apple.driver.AppleUSBTCKeyboard 237.1
com.apple.driver.AppleIRController 320.15
com.apple.iokit.SCSITaskUserClient 3.5.6
com.apple.driver.AppleFileSystemDriver 3.0.1
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0d1
com.apple.BootCache 34
com.apple.driver.XsanFilter 404
com.apple.iokit.IOAHCIBlockStorage 2.3.5
com.apple.driver.AppleUSBHub 635.4.0
com.apple.driver.AirPort.Brcm4331 615.20.17
com.apple.driver.AppleAHCIPort 2.6.6
com.apple.iokit.AppleBCM5701Ethernet 3.6.2b4
com.apple.driver.AppleSDXC 1.4.3
com.apple.driver.AppleFWOHCI 4.9.9
com.apple.driver.AppleUSBEHCI 621.4.6
com.apple.driver.AppleUSBUHCI 621.4.0
com.apple.driver.AppleSmartBatteryManager 161.0.0
com.apple.driver.AppleACPIButtons 1.8
com.apple.driver.AppleRTC 1.5
com.apple.driver.AppleHPET 1.8
com.apple.driver.AppleSMBIOS 1.9
com.apple.driver.AppleACPIEC 1.8
com.apple.driver.AppleAPIC 1.7
com.apple.driver.AppleIntelCPUPowerManagementClient 214.0.0
com.apple.nke.applicationfirewall 4.0.39
com.apple.security.quarantine 2.1
com.apple.driver.AppleIntelCPUPowerManagement 214.0.0
com.apple.iokit.IOSerialFamily 10.0.6
com.apple.kext.triggers 1.0
com.apple.iokit.IOBluetoothHostControllerUSBTransport 4.1.7f2
com.apple.driver.DspFuncLib 2.4.7fc4
com.apple.iokit.IOAudioFamily 1.9.2fc7
com.apple.kext.OSvKernDSPLib 1.12
com.apple.driver.IOPlatformPluginLegacy 1.0.0
com.apple.iokit.IOFireWireIP 2.2.5
com.apple.driver.IOPlatformPluginFamily 5.4.1d13
com.apple.driver.AppleThunderboltEDMSink 1.2.0
com.apple.driver.AppleThunderboltDPOutAdapter 2.5.0
com.apple.driver.AppleHDAController 2.4.7fc4
com.apple.iokit.IOHDAFamily 2.4.7fc4
com.apple.driver.AppleSMBusController 1.0.11d1
com.apple.driver.AppleBacklightExpert 1.0.4
com.apple.iokit.IOSurface 86.0.4
com.apple.iokit.IOBluetoothFamily 4.1.7f2
com.apple.driver.AppleSMC 3.1.5d4
com.apple.driver.AppleGraphicsControl 3.4.5
com.apple.iokit.IONDRVSupport 2.3.7
com.apple.iokit.IOGraphicsFamily 2.3.7
com.apple.driver.AppleThunderboltDPInAdapter 2.5.0
com.apple.driver.AppleThunderboltDPAdapterFamily 2.5.0
com.apple.driver.AppleThunderboltPCIDownAdapter 1.3.2
com.apple.driver.AppleUSBMultitouch 237.3
com.apple.iokit.IOUSBHIDDriver 623.4.0
com.apple.driver.AppleUSBMergeNub 621.4.6
com.apple.driver.AppleUSBComposite 621.4.0
com.apple.iokit.IOSCSIMultimediaCommandsDevice 3.5.6
com.apple.iokit.IOBDStorageFamily 1.7
com.apple.iokit.IODVDStorageFamily 1.7.1
com.apple.iokit.IOCDStorageFamily 1.7.1
com.apple.iokit.IOAHCISerialATAPI 2.5.5
com.apple.iokit.IOSCSIArchitectureModelFamily 3.5.6
com.apple.iokit.IOUSBUserClient 630.4.4
com.apple.driver.AppleThunderboltNHI 1.9.2
com.apple.iokit.IOThunderboltFamily 2.7.7
com.apple.iokit.IO80211Family 530.5
com.apple.iokit.IOAHCIFamily 2.5.1
com.apple.iokit.IOEthernetAVBController 1.0.2b1
com.apple.iokit.IONetworkingFamily 3.0
com.apple.iokit.IOFireWireFamily 4.5.5
com.apple.iokit.IOUSBFamily 635.4.0
com.apple.driver.AppleEFINVRAM 2.0
com.apple.driver.AppleEFIRuntime 2.0
com.apple.iokit.IOHIDFamily 1.8.1
com.apple.iokit.IOSMBusFamily 1.1
com.apple.security.sandbox 220.3
com.apple.kext.AppleMatch 1.0.0d1
com.apple.security.TMSafetyNet 7
com.apple.driver.DiskImages 345
com.apple.iokit.IOStorageFamily 1.8
com.apple.driver.AppleKeyStore 28.21
com.apple.driver.AppleACPIPlatform 1.8
com.apple.iokit.IOPCIFamily 2.8
com.apple.iokit.IOACPIFamily 1.4
com.apple.kec.corecrypto 1.0
Model: MacBookPro8,1, BootROM MBP81.0047.B27, 2 processors, Intel Core i5, 2.4 GHz, 4 GB, SMC 1.68f99
Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 384 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80AD, 0x484D54333235533642465238432D48392020
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80AD, 0x484D54333235533642465238432D48392020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom BCM43xx 1.0 (5.106.98.100.17)
Bluetooth: Version 4.1.7f2 12718, 3 service, 13 devices, 3 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Serial ATA Device: ST9500325ASG, 500.11 GB
Serial ATA Device: OPTIARC DVD RW AD-5970H
USB Device: hub_device, 0x0424 (SMSC), 0x2513, 0xfd100000 / 2
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd110000 / 3
USB Device: hub_device, 0x0424 (SMSC), 0x2513, 0xfa100000 / 3
USB Device: BRCM2070 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0xfa110000 / 5
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x821a, 0xfa113000 / 6
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0253, 0xfa120000 / 4
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8509, 0xfa200000 / 2 -
Control-k key binding broken. How can I check and change my key bindings?
I use the Terminal app a lot. Unfortunately I am not able to use the control-k shortcut to cut lines in the terminal anymore. How can I check (and change) the Terminal key bindings?
Thank you!Basing on your input, you should get the following values:
1) session keys
SK_ENC: 6DCE2A99BACB5207A7A96A92F114D66C
SK_MAC: 0D446132B168F75CD6F0A780693A4DD3
SK_DEK: 19F7B0F94837F32874B29B5EFB7809F6
2) host cryptogram
1B781553209748EA
3) Retail MAC
01761103B810F00E
Summing up, the External Authenticate command should have the following value: 84 82 01 00 10 1B781553209748EA 01761103B810F00E.
Try to compare it with your results.
Regards -
Key Bindings using the arrow keys
Following is some code that allows you to move a component around the screen using the arrow keys. I've noticed a problem and I'm just wondering if its Java or my keyboard.
Lets start with an example that works:
Press the down and right keys. Then press either the up or left key. The image moves proving that it supports 3 keys.
Now for the problem:
Press the up and left keys. Then press either the down or right key. Three things to notice:
a) the direction doesn't change when the third key is pressed
b) no output is displayed, so the ActionListener is not being invoked
c) after a short time, the program starts beeping
Now try rerunning the code after removing the comments that assign the key bindings to the "a, s, d, f" keys. Redo the above test and it works even if all four keys are pressed.
I don't remember this problem when I wrote the code a while ago, but I did recently get a cheap new keyboard so I'm just wondering if the problem is my keyboard or whether its a quirk with Java.
You can download Duke from here:
http://java.sun.com/docs/books/tutorial/uiswing/examples/components/LayeredPaneDemoProject/src/components/images/dukeWaveRed.gif
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class KeyboardNavigationProblem implements ActionListener
private JComponent component;
private int deltaX;
private int deltaY;
private Timer timer;
private int keysPressed;
private InputMap inputMap;
public KeyboardNavigationProblem(JComponent component, int delay)
this.component = component;
this.deltaX = deltaX;
this.deltaY = deltaY;
timer = new Timer(delay, this);
timer.setInitialDelay( 0 );
inputMap = component.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
public void addAction(int keyCode, String description, int deltaX, int deltaY)
new NavigationAction(keyCode, description, deltaX, deltaY);
public void updateDeltaX(int delta)
deltaX += delta;
public void updateDeltaY(int delta)
deltaY += delta;
public void actionPerformed(ActionEvent e)
int componentWidth = component.getSize().width;
int componentHeight = component.getSize().height;
Dimension parentSize = component.getParent().getSize();
int parentWidth = parentSize.width;
int parentHeight = parentSize.height;
// Determine next X position
int nextX = Math.max(component.getLocation().x + deltaX, 0);
if ( nextX + componentWidth > parentWidth)
nextX = parentWidth - componentWidth;
// Determine next Y position
int nextY = Math.max(component.getLocation().y + deltaY, 0);
if ( nextY + componentHeight > parentHeight)
nextY = parentHeight - componentHeight;
// Move the component
component.setLocation(nextX, nextY);
class NavigationAction extends AbstractAction implements ActionListener
private int deltaX;
private int deltaY;
private KeyStroke pressedKeyStroke;
private boolean listeningForKeyPressed;
public NavigationAction(int keyCode, String description, int deltaX, int deltaY)
super(description);
this.deltaX = deltaX;
this.deltaY = deltaY;
pressedKeyStroke = KeyStroke.getKeyStroke(keyCode, 0, false);
KeyStroke releasedKeyStroke = KeyStroke.getKeyStroke(keyCode, 0, true);
inputMap.put(pressedKeyStroke, getValue(Action.NAME));
inputMap.put(releasedKeyStroke, getValue(Action.NAME));
component.getActionMap().put(getValue(Action.NAME), this);
listeningForKeyPressed = true;
public void actionPerformed(ActionEvent e)
if (listeningForKeyPressed)
updateDeltaX( deltaX );
updateDeltaY( deltaY );
inputMap.remove(pressedKeyStroke);
listeningForKeyPressed = false;
if (keysPressed == 0)
timer.start();
keysPressed++;
else // listening for key released
updateDeltaX( -deltaX );
updateDeltaY( -deltaY );
inputMap.put(pressedKeyStroke, getValue(Action.NAME));
listeningForKeyPressed = true;
keysPressed--;
if (keysPressed == 0)
timer.stop();
System.out.println(KeyboardNavigationProblem.this.deltaX + " : "
+ KeyboardNavigationProblem.this.deltaY);
public static void main(String[] args)
JPanel contentPane = new JPanel();
contentPane.setLayout( null );
JLabel duke = new JLabel( new ImageIcon("dukewavered.gif") );
duke.setSize( duke.getPreferredSize() );
duke.setLocation(100, 100);
contentPane.add( duke );
KeyboardNavigationProblem navigation = new KeyboardNavigationProblem(duke, 100);
navigation.addAction(KeyEvent.VK_LEFT, "zLeft", -5, 0);
navigation.addAction(KeyEvent.VK_RIGHT, "zRight", 5, 0);
navigation.addAction(KeyEvent.VK_UP, "zUp", 0, -5);
navigation.addAction(KeyEvent.VK_DOWN, "zDown", 0, 5);
// navigation.addAction(KeyEvent.VK_A, "zLeft", -5, 0);
// navigation.addAction(KeyEvent.VK_S, "zRight", 5, 0);
// navigation.addAction(KeyEvent.VK_D, "zUp", 0, -5);
// navigation.addAction(KeyEvent.VK_F, "zDown", 0, 5);
JFrame frame = new JFrame();
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
frame.setContentPane( contentPane);
frame.setSize(800, 600);
frame.setLocationRelativeTo( null );
frame.setVisible(true);
}if you hold down left and right (so it doesn't move), down works, but not up.
hold up/down, right works but not left.Yes, the problem only seems to be when the up and left in combination with the right or down key is pressed.
num lock off - use the number pad arrow keys and all works OK Thats interesting, I didn't notice that. Although it just confuses the issue as to what the problem is.
So it appears to me that:
a) left + up + down, and
b) left + up + right
are special key combinations that are intercepted by either the OS or the JVM. Do these key combinations ring a bell to anybody?
I'm use JDK1.4.2 on XP. I wonder if other OS will have the same problem?
Again, this isn't a real, problem, just more of a curiosity. Thanks, -
Has anyone had a problem with Draft Emails getting sent with Mac OS 10.8.2? It just happened to me and sent a few drafts out to a potential employer I planned on sending out tomorrow.
Hi, one question & one suggestion...
What possible things are connected at home but not at the store, inlude every cable, etc.
One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for problem in Safe Mode...
PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
Reboot, test again.
If it only does it in Regular Boot, then it could be some hardware problem like Video card, (Quartz is turned off in Safe Mode), or Airport, or some USB or Firewire device, or 3rd party add-on, Check System Preferences>Accounts>Login Items window to see if it or something relevant is listed.
Check the System Preferences>Other Row, for 3rd party Pref Panes.
Also look in these if they exist, some are invisible...
/private/var/run/StartupItems
/Library/StartupItems
/System/Library/StartupItems
/System/Library/LaunchDaemons
/Library/LaunchDaemons -
Cut/Copy/Paste - How to set the key bindings ?
Hi,
I'm currently using the motif LnF in Windows. It matches the colors and style I want.
The problem is: people using Windows want to use the standard windows key bindings (that is: CTRL+V, CTRL+C, CTRL+X) instead of the Motif ones.
Does anyone how to set the old Windows key bindings into the Motif LnF ?
If anyone can provide some light, it'd be great !
Regards,
- JuanchoThe Swing tutorial on "General Rules for Using Text Components" has a demo program that shows you how to assign KeyStrokes to Actions.
Unfortunately the demo has not been updated in a while and still uses a keymap. The new approach would be to use an 'inputMap' and an 'actionMap'. The code for the copy action would be something like this:
textComponent.getInputMap().put(keyStroke, "copy");
textComponent.getActionMap().put("copy", action);
Again, the demo program 'TextComponentDemo' from the above tutorial will show you how to:
1) create the keyStroke for Ctrl+C
2) retrieve the default copy action from the editor kit -
How to customize key bindings, say emacs-like.
I have been able to install keyconfig, but I can't find the code for simple things like:
forward-char
backward-char
move-beggining-of-line
move_end-of-line
and other emacs-like commands.
The page
http://kb.mozillazine.org/Keyconfig_extension:_Thunderbird
has a long list of command I can shortcut, but none of the simple ones I need to navigate
the composition window, in emacs-like style.Yes, left and right arrows do the job, as well as Home and End keys. However, being a regular emacs user, it takes me less time and comes more natural to find C-f, C-b, C-a and C-e on the keyboard.
I actually have TB on two machines, home and work. In one of them the emacs-like key bindings work, but not on the other machine, even though they are running the same version of Mac OS and TB. -
Changing key bindings in xcode
I have quite a simple problem: a good portion of the key bindings i set in Xcode simply don't work.
Example: I set "code sense select next placeholder" as command+E on my desktop..yet on my laptop when I set it to that, it just beeps when I push command+E.
Second Example: I want to change the default key for popping up the class/method list [currently control+2], but it won't let me change it to command+2, or most other things for that matter. I've had so many problems I don't think ALL of the conflicts can be system/xcode presets that are unchangable.
How do I force Xcode to use the key bindings I want?
alternately: How do I see which programs are keeping Xcode from recognizing the key bindings I set?
Thanks,
Nickxcode 3 fixed this problem. hooray!
-
Xs key freezes intel mac ?
this has been getting worse over a period of a few weeks (unless i'm imagining it). i'm getting the spinning beachball so often and so long, that working has become impossible. as far as i can tell, this only happens when the xs key is connected.
this is happening on my 1.8 macBook. the g5 was fine.
anyone else had this ? anyone know a good way of confirming that it's the xs key that's the problem, before i begin the weary process of getting it replaced ?
cheers,
stuart
g5 1,8 DP + G3 PB 400 + g5 1.8 dp Mac OS X (10.3.9)i'm also having problems with my blue key. it's up to date and the utility reports correct functionality, BUT it is frequently not recognised when i launch logic. i don't get the spinning ball however. logic rarely bugs when i work with it, and if ever the key causes a problem during a session, logic pops up a message about losing connection to the key and offers me the possibility to save the project i'm working on.
it appears your spinning ball might be attributed to another factor... though one can never be too sure without thorough troubleshooting.
i recommend getting a new key, if only because these blue emagic keys are getting on a bit. you will gain peace of mind concerning the key, and can proceed to troubleshoot the other elements in case your problem persists.
personally i'm in the process of getting a new key, i just have to find the little piece of cardboard with my support ID which came with my logic upgrade... i hope i find it :/
good luck ! -
Hi all,
I'm looking for a way to define xterm/bash key bindings in a portable/transferable way. Nothing fancy, I'd just love to use Ctrl+Backspace as "backward-kill-word", Alt+d as "kill-word" and so on. So far I had to define a bunch of key bindings in my .bashrc, but what about all those ssh sessions I open?
Is there a way to automatically transfer key bindings from localhost to any ssh target? Are there terminal emulators other than xterm that can handle this in a sane way?
To complicate it further, I can't always install my favorite keymaps at work. We do share accounts on some of our servers, my colleagues aren't keen to use my keybindings 'cause they don't seem to work for them.
I can't even remember how long I've been fighting by this problem, still I don't see any solution for that. Any help is highly appreciated.Why not store your ~/.Xmodmap file in the cloud somewhere, then download it where and when you need it. Better yet, install Dropbox on all your machines so that those files you need on each computer sync each time you change them ??
-
6 keys "5tgb-[" on mac air keyboard do not work or act up
6 keys: "5tgb-[" on mac air keyboard do not work or act up. No known damage.
I took it to the Apple store and they checked it for free. They stated that they found liquid inside (to my great surprise), which costs $800 to fix. I declined, since a new one costs $1100. Even AppleCare would not have covered it, so it was not a problem that my 3-year AppleCare just expired.
I find it quite a coincidence that 2 of us had exact same problem within a week and we both posted it. -
InputMap/ActionMap key bindings for arrow keys, alt key
I'm having trouble defining InputMap/ActionMap key bindings for the arrow keys and the Alt key. My bound actions never run. I believe the problem is that the arrows are used in focus navigation, and the Alt key is used for opening the menu. How can I get these key bindings to work? Is there any other way that I can get events from these keys? I'd even be happy with simple AWT KeyListener events at this point. Thanks.
I've been having this same problem. I built a demo application that demonstrates the problem. It all works fine until I add the JTree. The JTree seems to be consuming the arrow key strokes. Here is the code:
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.KeyStroke;
public class ArrowKeyDemo extends JFrame implements ActionListener {
private javax.swing.JTree tree;
private javax.swing.JPanel panel;
public ArrowKeyDemo() {
initComponents();
panel.registerKeyboardAction(this, "A",
KeyStroke.getKeyStroke(KeyEvent.VK_A, 0, false),
JComponent.WHEN_IN_FOCUSED_WINDOW);
panel.registerKeyboardAction(this, "left",
KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0, false),
JComponent.WHEN_IN_FOCUSED_WINDOW);
private void initComponents() {
panel = new javax.swing.JPanel();
tree = new javax.swing.JTree();
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
panel.add(tree);
getContentPane().add(panel, java.awt.BorderLayout.CENTER);
pack();
private void exitForm(java.awt.event.WindowEvent evt) {
System.exit(0);
public static void main(String args[]) {
new ArrowKeyDemo().show();
public void actionPerformed(ActionEvent actionEvent) {
System.out.println(actionEvent);
}Having the JTree in there kills the ability to trap key strokes for any other purpose. This seems to be true of other Swing components as well. You can stop the JTree from consuming key strokes by adding the line:
tree.setActionMap(null);
But you will probably need to set the ActionMap to null for every Swing component that is trapping key strokes. I'm not 100% sure, but I think that includes scroll panes as well.
I'd love to hear a more elegant solution.
--Timothy Rogers -
JPasswordField affects key bindings
I set up some key bindings so my program can react to the arrow keys. I came across a rather confusing problem. I've set up a test case to show it:
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import javax.swing.*;
public class TestCase extends JFrame {
private static final long serialVersionUID = 1L;
JPanel contentPane;
CardLayout cl = new CardLayout();
public TestCase() {
super("Terraworld GUI Testing Zone");
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setResizable(false);
contentPane = new JPanel(cl);
contentPane.add(new TestTitlePanel(), "Title Screen");
setContentPane(contentPane);
pack();
setVisible(true);
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new TestCase();
public void addCard(JPanel card, String name, boolean show) {
contentPane.add(card, name);
if(show == true) {
cl.show(contentPane, name);
public void removeCard(JPanel card, String name) {
contentPane.remove(card);
cl.show(contentPane, name);
class TestTitlePanel extends JPanel implements MouseListener {
private static final long serialVersionUID = 1L;
JLabel loadCharacter;
public TestTitlePanel() {
super();
setPreferredSize(new Dimension(800, 600));
loadCharacter = new JLabel("Load Character");
loadCharacter.addMouseListener(this);
add(loadCharacter);
public void mouseClicked(MouseEvent e) {
if(e.getSource().equals(loadCharacter)) {
((TestCase)(getRootPane().getParent())).addCard(new TestLoadCharacterPanel(), "Load Character Screen", true);
public void mouseEntered(MouseEvent e) {}
public void mouseExited(MouseEvent e) {}
public void mousePressed(MouseEvent e) {}
public void mouseReleased(MouseEvent e) {}
class TestLoadCharacterPanel extends JPanel {
private static final long serialVersionUID = 1L;
public TestLoadCharacterPanel() {
super(null);
setPreferredSize(new Dimension(800, 600));
add(new LoadCharacterForm());
public class LoadCharacterForm extends JPanel implements ActionListener, MouseListener {
private static final long serialVersionUID = 1L;
JTextField usernameField;
JPasswordField passwordField;
JLabel cancelButton;
JLabel okButton;
public LoadCharacterForm() {
super(null);
setBounds(204, 167, 396, 225);
usernameField = new JTextField();
usernameField.addActionListener(this);
usernameField.setBounds(263, 46, 109, 20);
usernameField.setFont(new Font(Font.SANS_SERIF,
usernameField.getFont().getStyle(),12));
usernameField.setText("Default");
passwordField = new JPasswordField();
passwordField.addActionListener(this);
passwordField.setBounds(262, 71, 109, 20);
passwordField.setText("Default");
cancelButton = new JLabel("Cancel");
cancelButton.addMouseListener(this);
cancelButton.setBounds(163, 113, 45, 15);
okButton = new JLabel("Ok");
okButton.addMouseListener(this);
okButton.setBounds(347, 113, 28, 15);
add(usernameField);
add(passwordField);
add(cancelButton);
add(okButton);
public void actionPerformed(ActionEvent e) {
String username = usernameField.getText();
String password = new String(passwordField.getPassword());
String error = "";
if(!username.equals("") && !password.equals("")) {
((TestCase)(getRootPane().getParent())).addCard(new TestGamePanel(), "Game Screen", false);
((TestCase)(getRootPane().getParent())).removeCard(TestLoadCharacterPanel.this, "Game Screen");
else {
if(username.equals("")) {
error = "Username field is empty!";
if(password.equals("")) {
if(!error.equals("")) {
error += System.getProperty("line.separator");
error += "Password field is empty!";
JOptionPane.showMessageDialog(null, error);
public void mouseClicked(MouseEvent e) {
if(e.getSource().equals(okButton)) {
actionPerformed(new ActionEvent(usernameField, 1, ""));
else if(e.getSource().equals(cancelButton)) {
((TestCase)(getRootPane().getParent())).removeCard(TestLoadCharacterPanel.this, "Title Screen");
public void mouseEntered(MouseEvent e) {}
public void mouseExited(MouseEvent e) {}
public void mousePressed(MouseEvent e) {}
public void mouseReleased(MouseEvent e) {}
class TestGamePanel extends JPanel {
private static final long serialVersionUID = 1L;
public TestGamePanel() {
super(null);
setPreferredSize(new Dimension(800, 600));
setFocusable(true);
requestFocusInWindow();
Action downAction = new DownAction("Down", "Down");
Action upAction = new UpAction("Up", "Up");
Action rightAction = new RightAction("Right", "Right");
Action leftAction = new LeftAction("Left", "Left");
getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("DOWN"), downAction.getValue(Action.NAME));
getActionMap().put(downAction.getValue(Action.NAME), downAction);
getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("UP"), upAction.getValue(Action.NAME));
getActionMap().put(upAction.getValue(Action.NAME), upAction);
getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("RIGHT"), rightAction.getValue(Action.NAME));
getActionMap().put(rightAction.getValue(Action.NAME), rightAction);
getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("LEFT"), leftAction.getValue(Action.NAME));
getActionMap().put(leftAction.getValue(Action.NAME), leftAction);
class DownAction extends AbstractAction {
private static final long serialVersionUID = 1L;
public DownAction(String text, String desc) {
super(text);
putValue(SHORT_DESCRIPTION, desc);
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(null, "Down");
class UpAction extends AbstractAction {
private static final long serialVersionUID = 1L;
public UpAction(String text, String desc) {
super(text);
putValue(SHORT_DESCRIPTION, desc);
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(null, "Up");
class RightAction extends AbstractAction {
private static final long serialVersionUID = 1L;
public RightAction(String text, String desc) {
super(text);
putValue(SHORT_DESCRIPTION, desc);
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(null, "Right");
class LeftAction extends AbstractAction {
private static final long serialVersionUID = 1L;
public LeftAction(String text, String desc) {
super(text);
putValue(SHORT_DESCRIPTION, desc);
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(null, "Left");
}When you run that, click Load Character, then just click OK. If you press the arrow keys, corresponding alerts should come up. Now, if you rerun the program, and edit the JPasswordField in any way, then click OK, if you press the arrow keys, nothing happens. Somehow, by editing the password field, key bindings get messed up.
Does anyone know why this happens and how to fix it?Eh, I hate it when this happens, but I figured it out not long after I posted this. Sorry.
The problem was the Load Character screen was not being removed properly due to bad technique that I got from a source on Google. So the password field, which (if I understand properly) disables key bindings for security when it has the focus, or something along those lines, was not allowing the key bindings to happen.
To see further evidence, try editing the password field, then place the cursor in the top field (that says "Default") and click OK. It works.
Anyway, to fix the above code, I just changed the cases of TestLoadCharacterPanel.this (which didn't make any sense anyway) to this, which I didn't think would work, since it's an embedded class. But it did.
Sorry for the pointless post.
Maybe you are looking for
-
AE CC crashes on startup in Yosemite
AE CC and CC (2014) crashes on startup since I upgraded to Yosemite. I get this message: Last log message was: <140735200408320> <DynamicLink> <5> /Applications/Adobe After Effects CC 2014/Adobe After Effects CC 2014.app/Contents/dynamiclinkmanager.a
-
How do I measure the period of one TTL signal and the delay until a second TTL signal?
Hi, I have a PCI 6024E board, the SCB-68 terminal box and am running LabView 6.1. If needed I could install 7.1. I have two Honeywell sensors (HOA7720) which each consist of an infrared transmitter and a infrared reciever. When the beam is broken t
-
hi everybody i have a problem with my n80, everytime i send a txt message it will freeze up for about 1 minute u cant even do anything to the phone. and i only had this phone for about 2 weeks.Please help me..thank you.. Markris
-
my ipod touch will not connect to my home wi-fi internet which is locked,i've tried using the password on the router but it does not accept it. i phoned talk talk for advice but unfortunately i would have been as well asking an axe weilding monkey hi
-
Where are the images provided?
getting ready to do my first photo. where do I find the images so I can follow along"