Empyreus / lanterna

Automatically exported from code.google.com/p/lanterna
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Custom impls of KeyMappingProfile/KeyDecodingProfile must be in com.googlecode.lanterna.input package #112

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please make com.googlecode.lanterna.input.KeyDecodingProfile.getPatterns() 
public (instead of package private) so users of the library can provide extra 
mappings more nicely.

(My award use-case seems to require `new BasicCharacterPattern(new 
Key(Key.Kind.Enter), '\r')` :s)

Original issue reported on code.google.com by AlexHut...@gmail.com on 10 Jul 2014 at 4:29

GoogleCodeExporter commented 9 years ago
In upcoming Lanterna 3, you can call .addKeyDecodingProfile(..) on any 
StreamBasedTerminal with your custom pattern. 
In Lanterna 2.1, you can call .addInputProfile(..) directly on the Terminal. 
I think this will solve your problem?

Original comment by mab...@gmail.com on 12 Jul 2014 at 3:09

GoogleCodeExporter commented 9 years ago
I am using addInputProfile() (in 
https://github.com/haku/MorriganSshUI/blob/master/src/com/vaguehope/morrigan/ssh
ui/term/SshTerminal.java), the problem is that KeyMappingProfile.getPatterns() 
is missing the public keyword.  Thus I must put this 
https://github.com/haku/MorriganSshUI/blob/master/src/com/googlecode/lanterna/in
put/SshInputMapping.java in a different package directory for the Java compiler 
to be happy.

Original comment by AlexHut...@gmail.com on 12 Jul 2014 at 7:30

GoogleCodeExporter commented 9 years ago
Ah, yes, that method should obviously have been public. I've fixed it now.

Original comment by mab...@gmail.com on 21 Aug 2014 at 12:33