clipboard

UTF-8 text to clipboard C

人盡茶涼 提交于 2019-12-12 17:07:02
问题 I have been looking around on how to bring a string, const char* output = "ヽ(⌐■_■)ノ♪♬"; to the clipboard. SetClipboardData(CF_UNICODETEXT, hMem); I have tried MultiByteToWideChar, but I have gotten only noise and also conflicting claims that you cannot save UTF-16LE to clipboard (wchar_t). Honestly I am just confused. A direction or code sample would be great. 回答1: Windows uses UTF-16LE. The string should be created with L prefix. To use UTF8 you can declare the string with u8 prefix. For

Get permission for Chrome extension to read copied text

瘦欲@ 提交于 2019-12-12 14:26:34
问题 I'm creating a Chrome extension. I'd like to be able to see what users are copying to their clipboard from Chrome. Here's what I have currently working, in a content script: document.addEventListener( "copy", () => navigator.clipboard.readText().then( text => console.log("copied text: " + text) ) ); For security reasons that make sense, Chrome doesn't allow you to get the clipboard from the copy event itself. Instead, I have to get it from the navigator . The only issue is that Chrome asks

JavaFX: Mouse clipboard does not work in Unix

♀尐吖头ヾ 提交于 2019-12-12 12:05:39
问题 In Unix, as you probably know, it is common to use the mouse for copy-paste operations. I.e. text selection automatically copies it to the clipboard and clicking on the scroll pastes it where you click. I do not have clipboard problems with GUI applications that use Java 7 with Swing. But in JavaFX with Java 8 (update 45), the mouse clipboard does not work, so that: I cannot paste any text to the GUI by clicking the scroll I cannot copy any text from the GUI by just selecting it I encountered

Docker container sharing clipboard with host

本小妞迷上赌 提交于 2019-12-12 11:48:20
问题 I searched a bit on google but got no useful results. I'm finishing dockerizing vim and a common problem showed up: its container just won't share the clipboard with the host. I am used to building vim with +clipboard , and to being able to yank text and have it available to the host, or copying text in host and pasting in vim... I thought about making -v volumes that would share this data but I still got nowhere. I'm on Ubuntu 16.10. 回答1: The clipboard is almost certainly part of X, so you

Emacs: How to separate the kill ring from the system clipboard?

和自甴很熟 提交于 2019-12-12 11:32:58
问题 By default Emacs 23.x seems to copy content that's killed to the kill ring and to the system clipboard. Is it possible to keep the kill ring and clipboard separate? As in, ctrl+k puts stuff on the kill ring, cmd+x puts stuff on the system clipboard and leaves the kill ring alone. 回答1: That was discussed in this thread: Setting interprogram-cut-function to nil should do the trick. if I do a selection the Windows way and do a Ctrl-C or CTRL-Insert, then whatever I selected should be copied to

Getting Image from Clipboard Awt vs FX

不打扰是莪最后的温柔 提交于 2019-12-12 11:06:10
问题 Lately our Java-FX application can't read Images from the clipboard anymore. For example the user selects a part of an Image in Microsofts-Paint and presses copy. I am not talking about copied image files, those work fine. I'm pretty sure it worked already in the past, but I still need to verify that. Nevertheless I created a small example and compared the AWT with the FX clipboard to reproduce the behaviour: public class ClipBoardFxApp extends Application { @Override public void start( final

R data.table fread from clipboard

怎甘沉沦 提交于 2019-12-12 10:39:27
问题 I want to create an interface excel-R::data.table. I would like to ask how it is possible to use fread function with clipboard. Following code is working well but I would prefer to use fread instead of read.table (to reproduce copy some table in excel file and run above command in R): data.table(read.table("clipboard",sep="\t",header=TRUE)) I tried declaring connection to clipboard but so far cannot get it work. Also as stated in fread function documentation it is going to change and some

Microsoft Edge browser how to read Clipboard data

做~自己de王妃 提交于 2019-12-12 09:41:12
问题 I am unable to read clipboard data in Microsoft Edge browser. i am using the below javascript. if (window.clipboardData && window.clipboardData.getData) { // IE pastedText = window.clipboardData.getData('Text'); } else if (e.clipboardData && e.clipboardData.getData) { //non-IE pastedText = e.clipboardData.getData('text/plain'); } Non of the if/elseif block is executed in Edge. I tried using e.originalEvent.clipboardData.getData('text/plain'); But I am getting 'Access is denied.' error. Let me

How to use clipboard to copy data from Excel Sheet to DataTable?

我们两清 提交于 2019-12-12 09:40:00
问题 I have a Winform project, created on Microsoft Framework 3.5. The users may have installed Windows 7 or Windows XP, and Office 2007 or above. I'm working on in a procedure to get the clipboard data and put in on a C# DataTable. I already created a method to get the raw data from the clipboard and upload it in a DataTable. But in some cases, the Excel data shows a value, but internally have another: I'm investigating a method to get the raw data from Excel: string XmlFmt = "XML Spreadsheet";